Skip to content

Instantly share code, notes, and snippets.

@SQiShER
Created May 17, 2012 14:14
Show Gist options
  • Save SQiShER/2719185 to your computer and use it in GitHub Desktop.
Save SQiShER/2719185 to your computer and use it in GitHub Desktop.
Script for OS X that checks every 2 minutes whether the Apple Store is online and notifies you as soon as it's back online. Great if you want to buy a new product before its sold out!
#!/bin/sh
while [ true ]
do
if [ $(curl -XGET "http://store.apple.com/de" | grep "We'll be back soon" | wc -l) -eq 0 ]
then
say -v Alex 'The Apple Store is back online!'
growlnotify -m 'The Apple Store is back online!' -t 'Apple Store'
fi
sleep 120
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment