I've been updating my Nexus S phone a few days ago (to the latest Cyanogen release) and got to check out some new apps out there. Here's a cool free app that allows you to create simple automated actions on the phone based on certain conditions or events - AutomateIt.
This app allows you to create simple "When event/condition A happens, do action B" rules, for example:
* When I come home - turn on the WiFi on my phone (so it can connect to my home WiFi)
* When I leave home - turn off the WiFi to save battery
* When I plug-in my headphones - open the music player app (since that's the next logical action anyway)
* When I unplug my headphones - close the music app (otherwise, it will continue playing on the speaker for everyone around me if I forgot to pause it first).
* When I open Waze (nagivation app) - set volume to 100%, so I can hear the driving instructions on the speaker
* When I close Waze - set volume to 50% (I always forget to lower the volume back, and next time I listen to music it starts blasting into my ears).
and so on...
It's free and simple to use - here are some more examples of useful rules for you to check out.