By running an AppleScript when the power button is pressed, you can setup your system to immediately shutdown, restart, sleep, or eject a DVD. This is great for headless servers.
Known Limitations: PowerBlock does NOT prevent a hard shutdown if you hold the power button for more than 4 seconds.
Updated on Aug 05 2013
Powerblock is not compatible with OS X 10.9 due to changes in the power system.