Check These Out
Proper screencast with audio using ffmpeg and x264, as per http://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linux/
Sometimes commands give you too much feedback.
Perhaps 1/100th might be enough. If so, every() is for you.
$ my_verbose_command | every 100
will print every 100th line of output.
Specifically, it will print lines 100, 200, 300, etc
If you use a negative argument it will print the *first* of a block,
$ my_verbose_command | every -100
It will print lines 1, 101, 201, 301, etc
The function wraps up this useful sed snippet:
$ ... | sed -n '0~100p'
don't print anything by default
$ sed -n
starting at line 0, then every hundred lines ( ~100 ) print.
$ '0~100p'
There's also some bash magic to test if the number is negative:
we want character 0, length 1, of variable N.
$ ${N:0:1}
If it *is* negative, strip off the first character ${N:1} is character 1 onwards (second actual character).
This will enable the possibility to navigate in the history of the command you type with the arrow keys, example "na" and the arrow will give all command starting by na in the history.You can add these lines to your .bashrc (without &&) to use that in your default terminal.
Returns the number of lines in a file, emulates "wc -l" behavior with grep.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
If your last command was a dud, your bash prompt will be angry at you. Otherwise it's happy. Soon you will crave its constant approval and your linux skills will improve simply to avoid low self-esteem.
Convert JSON to YAML.
Note that you'll need to have PyYaml installed.
Convert some SVG files into PNG using ImageMagick's convert command.
Useful contexts :
You are doing yoga or some other physical training in which you are holding a position.
Or you practice the pomodoro productivity technique.
Or your girlfriend said "We're leaving in 40 minutes".
Design details:
sleep executes before espeak to give you a 5 seconds head start.
espeak is run in the background so it doesn't mess up the timing.