From: Einar Jørgen Haraldseid Date: Sun, 1 Jun 2014 22:13:49 +0000 (+0200) Subject: The ugly oneliner version of the imgur game X-Git-Url: https://git.slaskete.net/einar-bin/commitdiff_plain/3d33c5a7512044d3dafaedab7ba7bc26f82efece?ds=sidebyside;hp=1da8660c5029196025e7e91dd1d0c3fb5580da8b The ugly oneliner version of the imgur game --- diff --git a/imgurgame-oneliner.bash b/imgurgame-oneliner.bash new file mode 100644 index 0000000..a95705c --- /dev/null +++ b/imgurgame-oneliner.bash @@ -0,0 +1 @@ +while true; do url=http://i.imgur.com/$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1).jpg;if [[ $(curl -s -o /dev/null -I -w "%{http_code}" ${url}) == "200" ]]; then echo "Found ${url}"; fi; done