This script monitors a specific directory for changes and when it detects any, it executes a command. It is very useful when writing unit tests for example because you don't need to switch windows. With a 2 monitor setup it's la leche.
# on Debian/Ubuntu use apt-get
yum -y install inotify-tools wget
wget https://gist.github.com/tcz/6999795/raw/auto.sh