Last active
August 9, 2018 09:12
-
-
Save Oneiroi/9e4c2ca7fe4ccf93ddaa2867a1bf8cdb to your computer and use it in GitHub Desktop.
44con talks page watch
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
#!/bin/bash | |
OS=`uname` | |
URL44CON="https://44con.com/44con/44con-2018/44con-2018-schedule/" | |
#SET this to rickroll or w/e just make sure your speakers are on full volume | |
YTALERT="https://www.youtube.com/watch?v=H91rPIq2mN4" | |
if [ "Darwin" == "${OS}" ]; then | |
BROWSER="open"; | |
elif [ "Linux" == "${OS}" ]; then | |
BROWSER="sensible-browser" #Replace this with your browser of choice e.g. firefox | |
else | |
echo "OS Detection FAILED :( Aborting" | |
exit 1 | |
fi | |
#If you have not already set your ~/.curlrc you will want to set -H "User-Agent: A_BROWSER_UA_STRING" flag to curl. | |
#sleep command is present to preseve Wheatons law, remove it and you are a dick. | |
echo "XXX The OS detected is ${OS} I will use ${BROWSER} to open the URLs"; #Uncomment this line to echo out the detected OS & browser | |
while true; do curl -s ${URL44CON} | grep 'Oops' || (${BROWSER} "${YTALERT}" && \ | |
sleep 1 && | |
${BROWSER} "${URL44CON}"); \ | |
sleep 10; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated for 2018, at the time of writing page returns 404 so script greps for 'Oops' and in the absence of this will launch the page and YT alert video