0

Noprocrast

 3 years ago
source link: https://tutswiki.com/noprocrast/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

noprocrast

I wrote a command line script called noprocrast . This script updates /etc/hosts to make distracting websites unreachable from my machine:

sudo cp /etc/noprocrast_hosts /etc/hosts

The corresponding /etc/noprocrast_hosts :

127.0.0.1 localhost db001 db002 db003 db004 web030 web048
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

127.0.0.1 news.ycombinator.com
127.0.0.1 reddit.com www.reddit.com
127.0.0.1 twitter.com
127.0.0.1 nytimes.com www.nytimes.com

In case I really need to visit one of these sites, I use the following procrast script:

sudo cp /etc/procrast_hosts /etc/hosts
echo `date` >> ~/.procrasts

Then if I want to see how I have been doing with procrastination, I tail ~/.procrasts .

The /etc/procrast_hosts file is just:

127.0.0.1 localhost db001 db002 db003 db004 web030 web048
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

If you haven’t tried an /etc/hosts hack like this, I suggest giving it a try. You may be surprised by how much time you save.

Also see


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK