After spending all morning without internet access, I decided I wanted an R solution that would continue to check for internet access and alert me when it was back.
The package uses the pingr package to ping google.com, and the beepr package to (optionally) give an auditory alert when completed.
check4net(timeout=10, verbose=TRUE, beep=TRUE)
# Checking...Failure!
# Sleeping: 10...9...8...7...6...5...4...3...2...1...
# Checking...Failure!
# Sleeping: 10...9...8...7...6...5...4...3...2...1...
# Checking...Success!
# Net's back!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.