AutoVolume lets you set a target volume and when your Mac goes to sleep it sets the system volume to it.
Why? After listening to music with the volume high, I shut my laptop, and went to sleep. The next time I opened it was in a lecture at university.. while the music itself wasn't embarrassing, having it loudly playing in a lecture was!
Open source too.