Get-shit-done - Easy way to stop distractions
21–30 of 79 posts
Re: Get-shit-done - Easy way to stop distractions
#22Re: Get-shit-done - Easy way to stop distractions
#23Nowhere 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…
Re: Get-shit-done - Easy way to stop distractions
#24Re: Get-shit-done - Easy way to stop distractions
#25Re: Get-shit-done - Easy way to stop distractions
#26Re: Get-shit-done - Easy way to stop distractions
#27Sorry 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.
#!/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 restartRe: Get-shit-done - Easy way to stop distractions
#28I 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.
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/nullRe: Get-shit-done - Easy way to stop distractions
#29Re: Get-shit-done - Easy way to stop distractions
#30Nowhere 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…
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.