Skip to content

Instantly share code, notes, and snippets.

@dcrodman
Created June 30, 2020 03:41
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 dcrodman/79a5cce5f4a3d62dd3640cf5f7e0881f to your computer and use it in GitHub Desktop.
Save dcrodman/79a5cce5f4a3d62dd3640cf5f7e0881f to your computer and use it in GitHub Desktop.
#!/bin/bash
# A stupid little script for trolling my brother when he leaves his laptop open
set -e
cat > troll.sh <<"EOF"
#!/bin/bash
if [ -n $(pgrep -i zoom) ]; then
exit
fi
phrases=(
"you, sir, are a gargantuan wanker"
"remove your hands from me this instant"
"you make me want to format myself"
"rumor has it you are something of a weeb"
"there is something on your shirt"
"have you always been this funny looking?"
"one v one me, bro"
)
len=${#phrases[@]}
phrase=$(($RANDOM % $len))
say -v Daniel "${phrases[$phrase]}"
EOF
chmod +x troll.sh
mv troll.sh /usr/local/bin
echo "00 * * * * /usr/local/bin/troll.sh" | crontab -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment