Skip to content

Instantly share code, notes, and snippets.

@oktupol
Last active October 8, 2020 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oktupol/818e51bf72e8295c6b947a780ae39bad to your computer and use it in GitHub Desktop.
Save oktupol/818e51bf72e8295c6b947a780ae39bad to your computer and use it in GitHub Desktop.
Terminal-based Russian Roulette
#!/bin/bash
# Play Russian Roulette in your terminal. Include this file in your .bashrc with `. roulette.sh`
# Examples:
# sudo roulette rm -rf --no-preserve-root /
# roulette git checkout --orphan tmp && rm -r * && git add -A && git branch -D master && git push --force origin master
# roulette mail -s "Go f*** yourself" "boss@company.org" <<< ""
roulette() {
if [ $(($RANDOM % 6)) -eq 1 ]; then
$@
else
echo 'click...'
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment