A collection of Mac OS X CLI commands for fixing a frozen GUI

Once in a while my very overloaded Macs have a non-responsive GUI element. Usually I can log in via ssh. I have a few command line commands that help put things right.
Rebooting should be a last resort. The following are a few commands I have used to avoid going to that extreme when a CLI is available.

killall -KILL SystemUIServerRestart a non-responsive menu bar
killall -KILL DockRestart a non-responsive Dock
killall -KILL FinderRestart a non-responsive Finder
sudo killall -HUP WindowServerThis will log your desktop out!
sudo killall -3 WindowServerThis will log everyone out!