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
chmod +x auto.sh
auto.sh DIRECTORY_TO_MONITOR COMMAND_TO_EXECUTE
../auto.sh . phpunit
or
../auto.sh . behat
or
../auto.sh css "lessc css/* > css_compiled/single.css"