Check These Out
Useful for switching over someone else's coding style who uses camelCase notation to your style using all lowercase with underscores.
Counts number of lines of code in *.h and *.cc files
I've been using linux for almost a decade and only recently discovered that most terminals like putty, xterm, xfree86, vt100, etc., support hundreds of shades of colors, backgrounds and text/terminal effects.
This simply prints out a ton of them, the output is pretty amazing.
If you use non-x terminals all the time like I do, it can really be helpful to know how to tweak colors and terminal capabilities. Like:
$ echo $'\33[H\33[2J'
If you frequently need to connect to your ubersecure mainframe from various uberunsafe machines, you have to face difficult decision: (a) type the password everytime during the session (lame), (b) add local public key to mainframes authorized_keys file (unsafe), (c) as above, but remove this key at the end of the session (pain in the a55). So let's say you save The Command to tempauth file in bin directory of your mainframe's account and make it executable. Then, while you're on one of these unsafe ones, do:
$ cat $HOME/.ssh/id_rsa.pub|ssh 5z474n@mainframe.nl bin/tempauth 30
and password prompts stop the harassment for 30 minutes and you don't have to care to remove the unsafe key after that.
This bash function uses albumart.org to find the cover for an album. It returns an amazon.com url to the image.
Usage: albumart [artist] [album]
These arguments can be reversed and if the album name is distinct enough, it may be possible to omit the artist.
The command can be extended with wget to automatically download the matching image like this:
$ albumart(){ local x y="$@";x=$(awk '/View larger image/{gsub(/^.*largeImagePopup\(.|., .*$/,"");print;exit}'
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Using this command you can track a moment when usb device was attached.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"