News for hackers. Stuff that matters.
Re:Show HN: Block yourself from the Internet until you write... by ww520 on Tuesday July 17, 2012 @01:55PM (#4256865)
Prepare a hosts file as

    127.0.0.1   news.ycombinator.com
    127.0.0.1   reddit.com
    127.0.0.1   twitter.com
    etc
A shell script to rename the regular hosts file and this one at will. Add it in cron if you want it scheduled.
Re:Show HN: Block yourself from the Internet until you write... by daenz on Tuesday July 17, 2012 @02:23PM (#4257045)
Focus.py does something similar, but on a non-fixed schedule https://github.com/amoffat/focus
Re:Show HN: Block yourself from the Internet until you write... by henryboston on Tuesday July 17, 2012 @05:03PM (#4257871)
I did this for a while but I just ended up editing my hosts file every time I wanted to stop working. Maybe I just need to practice more self discipline.
Re:Show HN: Block yourself from the Internet until you write... by wpietri on Tuesday July 17, 2012 @06:06PM (#4258182)
A workable substitute for self-discipline is to make it hard enough to do the bad thing that either your laziness or your better nature wins out.

E.g., I don't keep cookies in the house. Instead, I go to the store if I want some. It's pretty rare that I'll overcome my laziness enough to head out for them. And then on the way I often come to my senses.

In this case, I might make it harder to edit the hosts file. E.g., a daemon that puts the block back automatically unless I solve 25 captchas.

I also really like LeechBlock's option to insert a 30-second pause before viewing banned websites. Since it cancels the countdown if the window loses focus, I have to just sit and wait for half a minute. 90% of the time I'll say, "But I don't even want to look at Facebook now," close the window, and get back to what I want to be doing.

Re:Show HN: Block yourself from the Internet until you write... by henryboston on Wednesday July 18, 2012 @11:32AM (#4261223)
Do they have LeechBlock for chrome?
Re:Show HN: Block yourself from the Internet until you write... by steveplace on Tuesday July 17, 2012 @07:38PM (#4258522)
I have taken it to an extreme and got a dd-wrt router that easily blocks websites through both time of day and mac address. My wife is the one that knows the password.
Re:Show HN: Block yourself from the Internet until you write... by ww520 on Tuesday July 17, 2012 @08:17PM (#4258629)
I found that often it's just muscle memory for going to a particular time sink site, like when the project is being rebuilt for that 10 seconds, I would check out HN but got sucked in for much longer. The hosts file blocking just breaks that habit and forces me to focus back on the project.
Re:Show HN: Block yourself from the Internet until you write... by idontlikebacon on Tuesday July 17, 2012 @01:56PM (#4256872)
I wrote a little shell script that makes it easy to manage host files for this very purpose. You can check it out here: https://github.com/theabraham/wrk