Skip to content

Instantly share code, notes, and snippets.

@philnelson
Last active December 15, 2016 21:06
Show Gist options
  • Save philnelson/bdaf746711a6b56c292b44c18cdfbe63 to your computer and use it in GitHub Desktop.
Save philnelson/bdaf746711a6b56c292b44c18cdfbe63 to your computer and use it in GitHub Desktop.
How to completely block politico.com from your computer (Mac OS X or Linux)
sudo sh -c 'echo "0.0.0.0 politico.com" >> /etc/hosts'
sudo sh -c 'echo "0.0.0.0 www.politico.com" >> /etc/hosts'
sudo sh -c 'echo "" >> /etc/hosts'
dscacheutil -flushcache
# Works with any browser or app and won't interfere with any other content blockers.
# Your /etc/hosts file is kind of a big deal, though, so... be careful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment