Skip to content

Instantly share code, notes, and snippets.

@Oneiroi
Last active August 9, 2018 09:12
Show Gist options
  • Select an option

  • Save Oneiroi/9e4c2ca7fe4ccf93ddaa2867a1bf8cdb to your computer and use it in GitHub Desktop.

Select an option

Save Oneiroi/9e4c2ca7fe4ccf93ddaa2867a1bf8cdb to your computer and use it in GitHub Desktop.

Revisions

  1. Oneiroi revised this gist Aug 9, 2018. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions 44con_talks_watch.sh
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    #!/bin/bash

    OS=`uname`
    URL44CON="https://44con.com/44con/44con-2017/talks-2017/"
    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="chromium" #Replace this with your browser of choice e.g. firefox
    BROWSER="sensible-browser" #Replace this with your browser of choice e.g. firefox
    else
    echo "OS Detection FAILED :( Aborting"
    exit 1
    @@ -17,7 +17,7 @@ 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 'shortly' || ${BROWSER} "${YTALERT}"; \
    sleep 1;
    ${BROWSER} "${URL44CON}"; \
    sleep 10; done
    while true; do curl -s ${URL44CON} | grep 'Oops' || (${BROWSER} "${YTALERT}" && \
    sleep 1 &&
    ${BROWSER} "${URL44CON}"); \
    sleep 10; done
  2. Oneiroi revised this gist Jun 7, 2017. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions 44con_talks_watch.sh
    Original file line number Diff line number Diff line change
    @@ -6,17 +6,18 @@ URL44CON="https://44con.com/44con/44con-2017/talks-2017/"
    YTALERT="https://www.youtube.com/watch?v=H91rPIq2mN4"

    if [ "Darwin" == "${OS}" ]; then
    BROWSER = "open";
    BROWSER="open";
    elif [ "Linux" == "${OS}" ]; then
    BROWSER = "chromium" #Replace this with your browser of choice e.g. firefox
    BROWSER="chromium" #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
    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 'shortly' || ${BROWSER} "${YTALERT}"; \
    sleep 1;
    ${BROWSER} "${URL44CON}"; \
    sleep 10; done
  3. Oneiroi revised this gist Jun 6, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 44con_talks_watch.sh
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ 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 $BROWSER";
    #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 'shortly' || ${BROWSER} "${YTALERT}"; \
    ${BROWSER} "${URL44CON}"; \
    sleep 10; done
  4. Oneiroi created this gist Jun 6, 2017.
    22 changes: 22 additions & 0 deletions 44con_talks_watch.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #!/bin/bash

    OS=`uname`
    URL44CON="https://44con.com/44con/44con-2017/talks-2017/"
    #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 = "chromium" #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 $BROWSER";
    while true; do curl -s ${URL44CON} | grep 'shortly' || ${BROWSER} "${YTALERT}"; \
    ${BROWSER} "${URL44CON}"; \
    sleep 10; done