Live data from Hacker News

Get-shit-done - Easy way to stop distractions

github.com

71–79 of 79 posts

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

#71
post #68

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.

Does this work with Chrome? I believe Chrome does it's own dns resolution and skips the host file. (I defiantly know it won't resolve localhost if you're offline)

I've edited my hosts file with various domain->ip mappings, and it's worked fine for me in chrome.

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

#72
post #17

treating the symptoms rather than the disease is only a good choice for short term or for incurable diseases

You may be right. But repeating an action forms a habit, or in this case learning to not repeatedly open up HN or Reddit can become a long-term habit for anyone with the right mindset.

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

#74
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.

How often do you modify your hosts file? I only ever find myself adding more things to block to it.

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

#76

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.

When I am working on Linux I do the same thing, except I have cron job copy hosts.work to hosts at 9am(insert your favorite get to work time) and hosts.play at 5pm. Works really well.

I wonder if one can do the same on Windows 7, some way of scheduling tasks easily.

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

#77
Instead of doing work, I got stuck modding this to get better behavior for Mac. First I tried to figure out what the $restartNetworkingCommand mac equivalent was (dscacheutil -flushcache for those who are curious). This works pretty well for non-Chrome browsers (i.e. browsers that don't have absurd caching behavior). Then, given that Chrome (which maintains its own DNS cache-- a decidedly not absurd caching behavior, I acknowledge) is my browser of choice, I also set out to fix it so I didn't need to restart Chrome. This endeavor I have accomplished using one of my favorite jank-tastic tactics: running applescript from the command line.

So here is my (Mac OS X 10.6+?) change:

$restartNetworkingCommand = 'dscacheutil -flushcache; osascript This, of course is made even more jank-tastic by manually sending command-w to close the window-- googling the proper command was more difficult than just doing it live :).

So yeah-- clearly I needed this script before reading this post, but if I had it probably would have done some terrible things to the space-time continuum... I guess I'll just amortize the one-time cost by actually using the script. Starting now.

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

#78
post #72
post #17

treating the symptoms rather than the disease is only a good choice for short term or for incurable diseases

You may be right. But repeating an action forms a habit, or in this case learning to not repeatedly open up HN or Reddit can become a long-term habit for anyone with the right mindset.

my main point being that if they stop with HN/Reddit something else will fill that gap. Not working is the issue.

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

#79

Instead of doing work, I got stuck modding this to get better behavior for Mac. First I tried to figure out what the $restartNetworkingCommand mac equivalent was (dscacheutil -flushcache for those who are curious). This works pretty well for non-Chrome browsers (i.e. browsers that don't have absurd caching behavior). Then, given that Chrome (which maintains its own DNS cache-- a decidedly not absurd caching behavior,…

yikes-- that formatting got butchered... anyone know if there's a better way to put code in comments?
Post reply on HN