Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save abrahamvegh/936156 to your computer and use it in GitHub Desktop.
Save abrahamvegh/936156 to your computer and use it in GitHub Desktop.
I swear I don’t know how this even works.
#!/bin/sh
while [ 1 ]
do
clear
echo "iPad 2 Wi-Fi White 16GB: "
# This magic courtesy of Garrett Murray: http://log.maniacalrage.net/post/4030658171/tip-how-to-get-an-ipad-2-at-target-today-i
# Thanks Garrett! I have barely an idea of how this works, but it is truly brilliant! :)
curl -s --data "_dyncharset=ISO-8859-1&asin=&dpci=057-10-1839&zipcode=YOUR_ZIP_CODE_GOES_HERE_BUB&city=&state=" http://sites.target.com/site/en/spot/mobile_fiats_results.jsp?_DARGS=/site/en/spot/mobile_fiats.jsp | grep -A 2 strong | sed -e 's/<p><strong>//' -e 's/<\/strong><br\/>//' -e 's/<br \/>//' -e 's/<\/p>//' -e 's/--//' -e 's/^[ \t]*//;s/[ \t]*$//' > ipad2-white.results
available=`cat ipad2-white.results | grep 'Avail'`
if [ ! -z available ]
then
echo "Nada"
else
while [ 1 ]
do
say -v Deranged "Ahhhhhhhhhh!"
done
fi
sleep 600
done
@asmallteapot
Copy link

EEEEKA. Shell script makes my head hurt.

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