Check These Out
Put this in your ~/.bashrc file (or the equivalent)
If you use vim a lot, this alias will be immediately obvious. Your brain will thank you.
This checks the system load every second and if it's over a certain threshold (.8 in this example), it spits out the date, system loads and top 4 processes sorted by CPU.
Additionally, the \a in the first echo creates an audible bell.
Using this command you can track a moment when usb device was attached.
similar to the previous command, but with more friendly output (tested on linux)
This is helpful for shell scripts, I use it in my custom php install script to schedule to delete the build files in 3 hours, as the php install script is completely automated and is made to run slow.
Does require at, which some environments without crontab still do have.
You can add as many commands to the at you want. Here's how I delete them in case the script gets killed. (trapped)
atq |awk '{print $1}'|xargs -iJ atrm J &>/dev/null
Never ending music, generated via a C snippet, piped to aplay. Taken from: http://canonical.org/~kragen/bytebeat/
Convert Text to HTML
I save this to bin/iptrace and run "iptrace ipaddress" to get the Country, City and State of an ip address using the http://ipadress.com service.
I add the following to my script to get a tinyurl of the map as well:
URL=`lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep details|awk '{print $2}'`
lynx -dump http://tinyurl.com/create.php?url=$URL|grep tinyurl|grep "19. http"|awk '{print $2}'
CDPATH tells the cd command to look in this colon-separated list of directories for your destination. My preferred order are 1) the current directory, specified by the empty string between the = and the first colon, 2) the parent directory (so that I can cd lib instead of cd ../lib), 3) my home directory, and 4) my ~/projects directory.
outputs a history of logins on the server (top 10, when piped to 'head'); optional flags: '-a' put the hostname at the end of the line (good for long hostnames), '-i' post the IP instead of the hostname, '-F' put the full login and logout times, rather than short times.