Every so often you will find that you shut down your computer at the wrong moment. For me this is usually just after I find I need to check an email or a website but is is to late. Most the the time it is usually followed by various expletives. What you need to do, is find a quick way to cancel the shut down by invoking a program that needs you to do something. Its really simple and usually works most of the time. Unless you are really slow.
The way to cancel shutdown is to open up Text Edit. Have it in the dock. If you are quick, you have a bout 5 seconds on a quick machine, to open up Text Edit and the shutdown will be cancel. What happens, I think, is that Text Edit opens and requires a save point. Which means that shut down will be canceled. It can also be done with other programs of this nature. For example Word, Photoshop, an unsaved email (although that might autosave). Basically anything that needs a file to be saved to continue. But keep in mind you want a program that opens you like lightening. Hence why Text Edit is a good option to pick.