Live data from Hacker News

Get-shit-done - Easy way to stop distractions

github.com

21–30 of 79 posts

Re: Get-shit-done - Easy way to stop distractions

#23

Nowhere near as broad-ranging, but I'll make the note for HN users not aware of it - if HN is your sole (main?) distraction, you can use the noprocrast feature on your user page. Change to Yes, add a max time you allow yourself to visit HN and then the min time you want to be forced to be away. As I say, nowhere near as broadly applicable or useful as the OP, but worth noting especially if (like me) HN is your distra…

The noprocrast feature stops working very well when you use Safari. It has the web page preview stuff, and every-time that refreshes the noprocrast kicks in. Since it does that way more often than I visit the site the site is continuously in noprocrast mode.

Re: Get-shit-done - Easy way to stop distractions

#27
post #19

Sorry to be the guy decrying PHP, but the only arguments I've found in it's favor are it's ubiquity and being sometimes "the right tool for the job" if you're quickly hacking together a dynamic webpage. Surely a simple cli app isn't the right job for this tool. Now, all that said, it _does_ work, and blahblahblah.

Yep, beware I didn't even tested it:

    #!/usr/bin/env zsh

    (($#&2
    blacklist=(
            reddit.com
            ycombinator.com
            slashdot.com
            )

    hostfile=/etc/host

    if [[ $1 = "play" ]]; then
        if [[ ! -e $hostfile.orig ]]; then
            cp $hostfile{,.orig}
        else
            print -- "You're already playin" >&2
            exit 1
        fi
        cp $hostfile{.orig,}
        for elem in $blacklist; do
            print -- "127.0.0.1\t$elem" >> /etc/host
            print -- "127.0.0.1\twww.$elem" >> /etc/host
        done
    fi

    if [[ $1 = "work" ]]; then
        cp $hostfile{.orig,}
        \rm $hostfile.orig
    fi

    /etc/init.d/networking restart

Re: Get-shit-done - Easy way to stop distractions

#28
post #3

I do this, although only by saying sudo cp hosts.play /etc/hosts or sudo cp hosts.work /etc/hosts It's simple, and surprisingly efficient.

The only problem with this method is that if you modify your hosts file, you have to modify both.

Just create a Makefile or something that cats together hosts.common and hosts.work or hosts.play.

  all:
      cat hosts.common hosts.work.in > hosts.work
      cat hosts.common hosts.play.in > hosts.play
Make common changes to hosts.common and easily build your final hosts files.

  play:
     cat hosts.play | sudo tee /etc/hosts > /dev/null

  work:
     cat hosts.work | sudo tee /etc/hosts > /dev/null

Re: Get-shit-done - Easy way to stop distractions

#30

Nowhere near as broad-ranging, but I'll make the note for HN users not aware of it - if HN is your sole (main?) distraction, you can use the noprocrast feature on your user page. Change to Yes, add a max time you allow yourself to visit HN and then the min time you want to be forced to be away. As I say, nowhere near as broadly applicable or useful as the OP, but worth noting especially if (like me) HN is your distra…

After playing with noprocrast, I found very good settings for me are

maxvisit: 20

minaway: 1

That means, every 20 minutes HN kicks me off for one minute. I leave it like that constantly - it means if I'm spending time on here nonstop for an hour or two, I get a couple little reminders to ask myself if I really want to be on here. If I do, it's not a big deal to get up and make myself a tea or whatever until 1 minute passes, if not I close the tab and get to business, and it's low enough that I don't cheat by logging in with another browser or Chrome Incognito Mode.

Post reply on HN