DOCGEN int Oodle_ComputeAPlusB(int A, int B); /* Computes A + B $:A the value of A in A+B $:B the value of B in A+B $:return the sum of and A and B Oh god please kill me now. */Every time I wrote one of those docs I would involuntarily pop up my web browser and see if Kids on Crack had any updates. So I started turning off my internet access to break that habit.
I was using ipconfig /release and /renew to do it, but that has a few problems : 1. it's very slow (not a big deal since the toggle is rare), and 2. it also kills my VPN to work.
Jeff suggested a better way is to turn DNS off and on. I found netsh can do that pretty easily.
I'd never used netsh before, it's pretty nice. The commands are :
netsh interface ip set dns name="Wireless Network Connection" dhcp
netsh interface ip set dns name="Wireless Network Connection" static 0.0.0.0
(or, you know, slightly different as is appropriate for your net config).
(note the flushdns also, otherwise you'll have things like Google in cache).
For machines you want to still access in "internet off" mode, you can of course just use their explicit IP, or slightly nicer you can add them to your "hosts" file.
(aside : another cool feature of netsh is that you can save & restore your entire network config if you want to temporarily mess things up; just use "netsh dump" to save it and "netsh exec" to restore it).