Skip to content

Instantly share code, notes, and snippets.

@cdl
Created July 4, 2015 01:31
Show Gist options
  • Save cdl/babab8bbe80e3a80fe23 to your computer and use it in GitHub Desktop.
Save cdl/babab8bbe80e3a80fe23 to your computer and use it in GitHub Desktop.
Block all of Reddit via your /etc/hosts file.
# Simply curl -s this and pipe it into sh.
# This script uses root privileges, be careful!
# Appends a list of known Reddit subdomains to your /etc/hosts file, and points them to localhost.
# Should work totally fine, but I take no responsibility if it messes up your machine.
# Made by Colby Ludwig (twitter.com/cdl)
sudo bash -c "echo -e '\n\n# -- Block all of Reddit --\n127.0.0.1\t\treddit.com\n127.0.0.1\t\twww.reddit.com\n127.0.0.1\t\tnp.reddit.com\n127.0.0.1\t\tssl.reddit.com\n127.0.0.1\t\tblog.reddit.com\n127.0.0.1\t\tfr.reddit.com\n127.0.0.1\t\tpay.reddit.com\n127.0.0.1\t\tes.reddit.com\n127.0.0.1\t\ten-us.reddit.com\n127.0.0.1\t\ten.reddit.com\n127.0.0.1\t\tru.reddit.com\n127.0.0.1\t\tus.reddit.com\n127.0.0.1\t\tde.reddit.com\n127.0.0.1\t\tdd.reddit.com\n127.0.0.1\t\tno.reddit.com\n127.0.0.1\t\tpt.reddit.com\n127.0.0.1\t\tww.reddit.com\n127.0.0.1\t\tss.reddit.com\n127.0.0.1\t\t4x.reddit.com\n127.0.0.1\t\tsv.reddit.com\n127.0.0.1\t\tnl.reddit.com\n127.0.0.1\t\thw.reddit.com\n127.0.0.1\t\thr.reddit.com' >> /etc/hosts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment