Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Command line tool for blocking sites to be more productive.
Throw these somewhere in your profile:
alias zonemode='sudo mv /etc/hosts /etc/hosts.zoneback && sudo mv /etc/hosts.zonemode /etc/hosts && dscacheutil -flushcache' alias zoneoff='sudo mv /etc/hosts /etc/hosts.zonemode && sudo mv /etc/hosts.zoneback /etc/hosts && dscacheutil -flushcache'
Then fill /etc/hosts.zonemode with the sites you want to block:
127.0.0.1 news.ycombinator.com
127.0.0.1 www.reddit.com
Then make sure your user can run passwordless sudo on those commands and you are set.
There are no comments on this comment yet.
Throw these somewhere in your profile:
alias zonemode='sudo mv /etc/hosts /etc/hosts.zoneback && sudo mv /etc/hosts.zonemode /etc/hosts && dscacheutil -flushcache' alias zoneoff='sudo mv /etc/hosts /etc/hosts.zonemode && sudo mv /etc/hosts.zoneback /etc/hosts && dscacheutil -flushcache'
Then fill /etc/hosts.zonemode with the sites you want to block:
127.0.0.1 news.ycombinator.com
127.0.0.1 www.reddit.com
Then make sure your user can run passwordless sudo on those commands and you are set.