If you use bash for scripting you will undoubtedly have to use conditions a lot, for example for an if ... then construct or a while loop. The syntax of these conditions can seem a bit daunting to learn and use. This tutorial aims to help the reader understanding conditions in bash, and provides a comprehensive list of the possibilities. A small amount of general shell knowledge is assumed. Difficulty: Basic - Medium
Author: Anthony James Founder/CEO
Varnish made some changes in how you clear the cache in Varnish 3. Hence the confusing title. However, it's simple to clear the cache now, by using the "ban" command. [:$] varnishadm -T 127.0.0.1:6089 ban.url /index.html There are a few things you should be aware of. Varnish can run on different ports than 6089, so if you receive the following error:
http://youtu.be/5jdalvKzl98 This lesson will show you how to install Git on your machine, create a basic GitHub repository, and configure our server to connect to GitHub with SSH. This will allow us to transfer files to and from the repository securely.
The grep command allows searching the contents of a file from the command line. It's a very useful tool to find a particular line in, say, a log file or a conf file. And because it's a command line program, you can combine it with other commands in various ways to produce powerful results. In this tutorial, you will learn both the basics and some more advanced applications of grep.
This is a collection of some of the basic VI commands and shortcuts for newbies. You'll find yourself needing this if you are coding or scripting inside of the unix/linux command line using VI. Command Mode: Accepts commands, which are usually in the form of individual letters. Example, a and i. You can use h, j, k and I to navigate in similar ways as the up and down arrow. Not needed if you have an up and down arrow on your keyboard. Yank – Term used to copy files. Use YY to yank text. Navigate to the line you wish to yank and type yy make sure you are in command mode. 2yy will yank 2 lines, 4yy will yank 4 lines. Precede the YY command with the number of lines you would like to yank.
If you're familiar with Amazon Web Services, then you know that it is supposed to have enough redundancy at Amazon's data centers to protect against such an issue. Still it's possible, as we've seen, for Amazon Web Services to have an unavoidable outage. Here's a few simple methods to hedge against these outages. Difficulty: Basic
Most of you will be happy with starting out making 2D games, others would want to jump right in to…
This article tells about FLAC: what is it, why use it and how to use it? Note: in this article, you will encounter both FLAC and flac. The uppercase version is used to refer to the format, the lowercase version is used to refer to a flac file and the flac command. What is FLAC? As you might have guessed from the title of this article, FLAC is an abbreviation of Free Lossless Audio Codec. The first word ("free") should be pretty clear (it's an open-source project), but what is a "lossless audio codec"? Well, the well-known MP3 format is an audio codec. It is used to compress raw audio data. MP3 is a so-called "lossy" codec, meaning that, for example, if you would convert a wav file to an mp3, and then convert the mp3 file back to wav, you won't end up with the same audio data. MP3 reduces the quality of the audio while encoding. On the other hand, FLAC is "lossless". If you would convert a wav file to a flac, and then convert the flac file back to wav, you will end up with exactly the same wav file. Nevertheless, a flac file is a lot smaller than a wav file.
I recently discovered a very useful tool: xrandr. This command allows you to reset your screen resolution, which comes in very handy when some buggy app changes you screen resolution and doesn't set it back. It saves logging out and in again or even having to use Ctrl + Alt + Backspace!
The commands diff and patch form a powerful combination. They are widely used to get differences between original files and updated files in such a way that other people who only have the original files can turn them into the updated files with just a single patch file that contains only the differences. This tutorial explains the basics of how to use these great commands. Difficulty: Medium