Skip to content

Instantly share code, notes, and snippets.

@sirupsen
Created March 13, 2013 10:43
Embed
What would you like to do?
My /etc/hosts and the accompanying crontab.
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 twitter.com
127.0.0.1 www.twitter.com
127.0.0.1 reddit.com
127.0.0.1 www.reddit.com
127.0.0.1 news.ycombinator.com
127.0.0.1 *.reddit.com
127.0.0.1 jp.dk
127.0.0.1 www.jp.dk
127.0.0.1 pol.dk
127.0.0.1 www.pol.dk
127.0.0.1 politiken.dk
127.0.0.1 www.politiken.dk
127.0.0.1 b.dk
127.0.0.1 www.b.dk
127.0.0.1 berlingske.dk
127.0.0.1 www.berlingske.dk
127.0.0.1 dr.dk
127.0.0.1 www.dr.dk
@sirupsen
Copy link
Author

Be sure to pair with this crontab:

*/5 17 * * * cp /etc/hosts.unfocus /etc/hosts
*/5 0-16,18-23 * * * cp /etc/hosts.focus /etc/hosts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment