Last Updated: May 02, 2019
·
7.619K
· netzzwerg

Ultimate Webdev Time Saver

With my wonder script you have more focus on your customer projects under localhost. So you get things done like a zen master. Believe Me.

timesaver.sh

#!/bin/bash
echo "127.0.0.1 www.facebook.com" >> /etc/hosts
echo "127.0.0.1 www.twitter.com" >> /etc/hosts
echo "127.0.0.1 www.youtube.com" >> /etc/hosts
echo "127.0.0.1 www.pinterest.com" >> /etc/hosts
echo "127.0.0.1 www.stumbleupon.com" >> /etc/hosts
echo "127.0.0.1 www.reddit.com" >> /etc/hosts
echo "127.0.0.1 www.slashdot.org" >> /etc/hosts
echo "127.0.0.1 news.ycombinator.com" >> /etc/hosts
echo "127.0.0.1 www.4chan.org" >> /etc/hosts
echo "127.0.0.1 www.9gag.com" >> /etc/hosts

11 Responses
Add your response

Hosting all those sites locally must slow your laptop down!

over 1 year ago ·

With my wonder script you no longer need this sites.

over 1 year ago ·

I coded a bash script ( https://gist.github.com/748896 ) with the same idea and man, you really save time!

over 1 year ago ·

Hi netzzwerg,
i cant catch this trick totaly, would you mind just explain how to doit simply?

Thanks in advance ~!

over 1 year ago ·

Does not work if you use chrome and already visited those websites : it keeps its own DNS cache and won't care about your changes :(

I tried to make a pomodoro script based on this idea some time ago but had to give up.

over 1 year ago ·

All those poor souls integrating social networking APIs.

over 1 year ago ·

@naholyr I think including a call to flush the cache may help it work with Chrome. (Not FF yet.) I'm still doing a bit of debugging on the version I built for practice that has a cache flush, but you're welcome to give it a shot.

You can also turn it on/off.

https://github.com/sjhcockrell/gsd/downloads

over 1 year ago ·

@afgomez I recreated a version of yours to practice my bash scripting. Thanks for putting it out there!

over 1 year ago ·

@sjhcockrell neat! I will shamelessly copy the good parts tomorrow and blend them with mine :)

over 1 year ago ·

You forgot imgur. :p

over 1 year ago ·

cool trick, but isn't the concept of discipline central to the idea of being a zen master?

over 1 year ago ·