Skip to content

Instantly share code, notes, and snippets.

@darighost
Last active October 10, 2023 02:04
Show Gist options
  • Save darighost/974831eb71eebe154987b9e6724dcf06 to your computer and use it in GitHub Desktop.
Save darighost/974831eb71eebe154987b9e6724dcf06 to your computer and use it in GitHub Desktop.
Script made with daughter to alert us when our internet decides to come back on (guatemala life)
import requests
import subprocess
import time
while True:
try:
req = requests.get('https://google.com')
subprocess.run('say "Internet connection has been established"', shell=True)
break
except:
pass
time.sleep(5)
@darighost
Copy link
Author

Our internet went out again, so we wrote this script to alert us verbally when it starts back up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment