Get-shit-done - Easy way to stop distractions
github.com
github.com
$ sudo /etc/inid.d/procrastination-ctl start
OK.
$ sudo /etc/inid.d/procrastination-ctl stop
You need to wait 59 minutes before you can stop.
Managed to waste a whole day on that one.I love the irony.
As I say, nowhere near as broadly applicable or useful as the OP, but worth noting especially if (like me) HN is your distraction of choice and you have minimal technical skills.
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.
this is a small and interesting portion of mindspace
While it is not a huge problem, and there is lot of value I extract from this site, culling seems like a good idea. A daily quota would help me avoid the high hitters and still keep myself "well read".
sudo cp hosts.play /etc/hosts
or sudo cp hosts.work /etc/hosts
It's simple, and surprisingly efficient. 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/nullsudo cp /etc/hosts.bak /etc/hosts
Note: I just wrote this now with no testing whatsoever.
I wonder if one can do the same on Windows 7, some way of scheduling tasks easily.
#!/bin/sh
[ $UID -eq 0 ] || { echo "You're not root, asshole."; exit 1; }
[ -f "/etc/hosts.$1" ] || { echo "/etc/hosts.$1 doesn't exist, asshole."; exit 1; }
cat /etc/hosts.{$1,tail} > /etc/hosts
... sudo ~/bin/stopfuckingoff playSurely a simple cli app isn't the right job for this tool.
Now, all that said, it _does_ work, and blahblahblah.
#!/usr/bin/env zsh
(($#<1)) && {
print -- "usage: $0:t (play|work)"
exit 1
}>&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 restartdoes windows of access, allows for x minutes, has grouping. Course, it's FF only where hosts file gets your whole connection.
latest version has a neat feature which tracks links from blocked pages. Ie if I give myself 15 mins of HN a day, but end up wasting 2 hours because I only spend 10 secs on HN opening up tabs to read, it now tracks that. Any links you click from HN will count towards your time limit.
or even more surprising might be the amount of time i've spent procrastinating by reading about people who've procrastinated by making tools to aid their procrastination...
...I'm going to get back to work :)
So here is my (Mac OS X 10.6+?) change:
$restartNetworkingCommand = 'dscacheutil -flushcache; osascript <<EOF tell application "Google Chrome" make new tab at end of tabs of window 1 with properties {URL:"chrome://net-internals/#dns"} activate delay .5 set URL of active tab of window 1 to "javascript:document.getElementById(\'clearHostResolverCache\').click()" end tell delay .5 tell application "System Events" to keystroke "w" using {command down} EOF';
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.
A similar script, but with an 'addsite whatever.com' command.
https://github.com/cdown/ncrast/blob/master/ncrast http://aur.archlinux.org/packages.php?ID=48731
To start, it's a command line utility. I need to answer the question "Do you want to waste your time?" with "yes" to turn off the filters.
Then I didn't bother running in a way that the script had permissions to edit /etc/hosts so I need to enter my system password every time I want to make a change.
I also automatically turn the filters on every hour.
I also log both the number of times I turn the filters off and whether the filter is on at about 1pm.
I'm running a test right now to not turn on the filters automatically every hour and there is already a noticeable decrease in productivity in my rescuetime.
I'm about to update the logger to use the google charts API to save a historic graph of performance to a directory that is used as my desktop background.
Address: https://chrome.google.com/webstore/detail/pfglnpdpgmecffbejl...
Website Blocker seems to be similar, but without a time limit: https://chrome.google.com/webstore/detail/hclgegipaehbigmbhd...
I just subconsciously don't trust one-letter autocomplete I guess.
figlet -f univers time to work! | boxes
figlet -f starwars game time! | boxes -d dogMemorize reddit's IP.
Far preferable is the event-driven technique whereby I make a cursory attempt at doing some real stuff until the HN bot tweets something of fleeting interest, at which point I defer said real stuff to a background thread to be completed in an asynchronous fashion.