Skip to content

Instantly share code, notes, and snippets.

View agodin3z's full-sized avatar
🍻
Working hard~

Andrés Godínez agodin3z

🍻
Working hard~
View GitHub Profile
@boyd
boyd / check_internet.py
Created October 22, 2012 03:27
Script for monitoring internet
import datetime
import time
import urllib2
def log(s, ts=None):
ts = datetime.datetime.now()
print ts.strftime("%H:%M:%S ") + s
def main():
last_state_change = time.time()