Check These Out
There are some pretty good live performances on late night TV. With Mythtv I record David Letterman, Jimmy Fallon, and Conan nightly all in HD from over the air broadcasts. If I find a live performance I like I copy it to my Rockboxed iPod using this command. The Rockbox firmware knows how to downmix 5.1 audio. The command above extracts the audio from the video starting at 58 minutes and 15 seconds. It ends at the end of the file since this was the last performance of the recording. The command creates an ac3 file. I copy the ac3 file to my Rockbox iPod and rock on.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
This forces a bonded interface to switch to another slave in the bond as its active slave.
Launch a gui app remotely. In this example smplayer is installed on the remote machine, and movie.avi is in the remote user's home dir. Note that stdout/stderr is still local, so you'll have feedback locally, add '&>/dev/null' to suppress. This is surprisingly not well known (compared to running an X app locally via ssh -X). (NB. if your distro requires ~/.Xauthority file present, then try -fX if you have problems)
Resubmitted (and trimmed, thanks sitaram) due to ridiculous voting on previous submission. Fingers crossed, it gets a better rating this time.
Short method of "while x=0; do foo ; sleep 1 ; done"
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
This function displays the latest comic from xkcd.com. One of the best things about xkcd is the title text when you hover over the comic, so this function also displays that after you close the comic.
To get a random xkcd comic, I also use the following:
$xkcdrandom(){ wget -qO- dynamic.xkcd.com/comic/random|tee >(feh $(grep -Po '(?
this is helpful because dmesg is where i/o errors, etc are logged to... you will also be able to see when the system reboots or someone attaches a thumb drive, etc.
don't forget to set yourself up in /etc/aliases to get roots email.