Skip to content

Instantly share code, notes, and snippets.

@TravonteD
Last active March 17, 2022 14:36
Show Gist options
  • Select an option

  • Save TravonteD/b02762bf5abd8f99c7b69a18c044a528 to your computer and use it in GitHub Desktop.

Select an option

Save TravonteD/b02762bf5abd8f99c7b69a18c044a528 to your computer and use it in GitHub Desktop.
Github Recovery Notification
#!/usr/bin/env bash
data=$(\
curl -s 'https://www.githubstatus.com/api/v2/status.json' \
-H 'Referer: https://www.githubstatus.com/' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Connection: keep-alive' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Cache-Control: max-age=0' \
-H 'TE: trailers'\
)
while true
do
if ! [[ "$(echo "$data" | jq '.status.description')" =~ "Outage" ]]
then
terminal-notifier -title "Github" -message "GITHUB IS BACK FAM!!!"
exit 0
fi
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment