Last active
March 17, 2022 14:36
-
-
Save TravonteD/b02762bf5abd8f99c7b69a18c044a528 to your computer and use it in GitHub Desktop.
Github Recovery Notification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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