Snow Leopard DNS fix
Sometimes when I wake up my work MacBook Air running Snow Leopard, DNS is broken. I can go to a terminal window and ping things by name, but neither Chrome nor Safari can resolve any DNS names. I figured out you can just kill off mDNSResponder and it will respawn itself and DNS will be working again. Like this:
sudo killall mDNSResponder
It happens enough that I wrote it into a little app. If the above command works for you, you can download the app, SnowLeopardDNSFix, here. It might work for you if you have the same issue in Leopard or Lion. It’s certainly not going to hurt. Just drop it into your Applications folder and then drag it to the dock. It’s going to ask you for an admin password as that’s needed to kill processes not owned by you.
If you care, the app is just one line of AppleScript that does this:
do shell script “sudo killall mDNSResponder” with administrator privileges
You could recreate the app yourself using the AppleScript editor in about 30sec if you were so inclined.