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)
Get-shit-done - Easy way to stop distractions
71–79 of 79 posts
Re: Get-shit-done - Easy way to stop distractions
#72treating the symptoms rather than the disease is only a good choice for short term or for incurable diseases
Re: Get-shit-done - Easy way to stop distractions
#73Re: Get-shit-done - Easy way to stop distractions
#74I 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.
Re: Get-shit-done - Easy way to stop distractions
#75 figlet -f univers time to work! | boxes
figlet -f starwars game time! | boxes -d dogRe: Get-shit-done - Easy way to stop distractions
#76I 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.
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
#77So 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
#78treating 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
#79Instead 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,…