2# Bash functions for notifying when your internet connection comes back up
3# From https://brettterpstra.com/2018/05/04/shell-tricks-what-to-do-when-you-cant-do-internet/
8# A truly atrocious way to get your attention
11 for phrase in "$@"; do
12 afplay /System/Library/Sounds/Ping.aiff
19# Poll a DNS resolver to see when you can reach it, then notify
21 until ping -W1 -c1 8.8.8.8; do
25 "internet connection is back up\!" \
26 "Skynet is thinking" \
27 "your tribulation is over\!" \
28 "Praise what gods may be. internet\!" \
29 "O M G we're online" \
30 "In the words of Dr. Frankenstein, it's alive\!"