Skip to content

Instantly share code, notes, and snippets.

@JonWatkins
Last active September 20, 2021 07:58
Show Gist options
  • Select an option

  • Save JonWatkins/f69b366c5ef989ab8a1e to your computer and use it in GitHub Desktop.

Select an option

Save JonWatkins/f69b366c5ef989ab8a1e to your computer and use it in GitHub Desktop.
Silly joke bash script.
#! /bin/bash
curl "https://gist.githubusercontent.com/JonWatkins/f69b366c5ef989ab8a1e/raw/b021e57a53b42c66541d654222b9dc52337abbc0/russia" -o "/usr/local/bin/russia"
chmod +x /usr/local/bin/russia
#! /bin/bash
JOKES[0]="In soviet russia, you don't release software. Software release you"
JOKES[1]="In soviet russia, you don't test software. Software test you"
JOKES[2]="In soviet russia, you don't integrate A.P.I. A.P.I integrate you. Then explode"
JOKES[3]="In soviet russia, you don't write code. Code write you"
# Get the length of the array
LEN=${#JOKES[@]}
# Get a random number between 0 and the array length
RAND=$(( RANDOM % LEN ))
# Commands the mac to tell the joke you will need to have the yuri voice installed
# for it to sound russian, else it uses the default voice.
say -v "yuri" ${JOKES[RAND]}
@JonWatkins

Copy link
Copy Markdown
Author

Simple way to install the script. You may also need to install the "yuri" voice for the best effect.

curl http://tinyurl.com/hmby9ur -L | sh

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