my4bqg
Last Updated: February 25, 2016
·
7.196K
· netzzwerg
393640f88c24599cde6d104c3d0b913c

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

1749

Hosting all those sites locally must slow your laptop down!

over 1 year ago ·
1755
393640f88c24599cde6d104c3d0b913c

With my wonder script you no longer need this sites.

over 1 year ago ·
1830
578855 3794745059411 1045494353 n

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

over 1 year ago ·
1834

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

Thanks in advance ~!

over 1 year ago ·
1836
396445b6e14727dcb6b3d6a66d52b567

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 ·
1837
B50005fc2bfb82715bd0ab1e03f8db45

All those poor souls integrating social networking APIs.

over 1 year ago ·
1846
G profile

@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 ·
1847
G profile

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

over 1 year ago ·
1849
578855 3794745059411 1045494353 n

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

over 1 year ago ·
2046
A2f9d9f971b1ab40760413c96d43261e

You forgot imgur. :p

over 1 year ago ·
13082
Ec61d4d2928411e280a722000aaa08b2 7

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

over 1 year ago ·