Skip to content

Instantly share code, notes, and snippets.

@yahelc
Last active December 15, 2015 10:39
Show Gist options
  • Save yahelc/5246860 to your computer and use it in GitHub Desktop.
Save yahelc/5246860 to your computer and use it in GitHub Desktop.
Bash script for Mac OS X to check, every 10 seconds, if the audio recordings for the #DOMA case are posted yet, and will open the page in Safari when it's posted.
while true
do
if (curl -is http://www.supremecourt.gov/oral_arguments/argument_audio_detail.aspx?argument=12-307 | grep -q "Location");
then
echo "Not posted yet :(" && sleep 10;
else
open http://www.supremecourt.gov/oral_arguments/argument_audio_detail.aspx?argument=12-307; break;
fi
done
@yahelc
Copy link
Author

yahelc commented Mar 27, 2013

To run this on Mac OS X, open up the Terminal app, and paste the contents of this file. Once the recordings get posted, it will automatically open the page with the recording in your browser. You can leave Terminal on in the background; it'll open it and interrupt whatever you're doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment