Skip to content

Instantly share code, notes, and snippets.

@reillysiemens
Last active January 14, 2016 07:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reillysiemens/82579d4d6fa5703b9ca3 to your computer and use it in GitHub Desktop.
Save reillysiemens/82579d4d6fa5703b9ca3 to your computer and use it in GitHub Desktop.
I got bored.
alias roulette='for i in {0..5}; do echo -e "import random as rand; import webbrowser as wb; import string as s; import urllib.request as req\ntry:\n\tu = \"https://bit.ly/%s\" % \"\".join(rand.choice(s.ascii_letters+s.digits) for _ in range(0, 6))\n\tr = req.urlopen(u)\n\tprint(\"BANG!\")\n\twb.open(u)\nexcept:\n\tprint(\"click\")" | python3; done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment