Skip to content

Instantly share code, notes, and snippets.

@tvlooy
Created May 7, 2012 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvlooy/2630719 to your computer and use it in GitHub Desktop.
Save tvlooy/2630719 to your computer and use it in GitHub Desktop.
How to block facebook in a very funny way
#!/bin/bash
while [ TRUE ]; do
detect=$(netstat -an | grep `dig +short www.facebook.com` | grep ESTA | wc -l)
if [ $detect -ne 0 ]; then
osascript -e "set Volume 7"
say -v Zarvox "computer says no, `whoami`"
killall Safari
sleep 10
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment