Skip to content

Instantly share code, notes, and snippets.

@danvctr
Created December 25, 2014 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danvctr/949acc651c9599f8dd38 to your computer and use it in GitHub Desktop.
Save danvctr/949acc651c9599f8dd38 to your computer and use it in GitHub Desktop.
@echo off
REM This is the "main loop", should be pretty obvious what it does
:pingloop
ping -n 1 google.com
if errorlevel 1 goto fix
if errorlevel 0 goto wait
REM Make sure you remove the "echo" or it won't do anything lol
:fix
echo netsh interface set interface "markwireless20" disable
echo netsh interface set interface "markwireless20" enable
goto wait
REM This is a hack I learned back in 'nam that emulates the sleep() fuction of UNIX terminals, which Windows terminals lack...
:wait
ping -w 5000 127.0.0.1 > nul
goto pingloop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment