Last active
August 29, 2015 14:07
-
-
Save trptcolin/2d713df94f292c832685 to your computer and use it in GitHub Desktop.
ceci n'est pas une joke
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a little ditty for osx | |
function voices() { | |
say -v "?" | cut -d" " -f1,2 | sed -e 's/ *$//' | |
} | |
function shuffle_for_stupid_osx_that_doesnt_have_it_built_in() { | |
perl -MList::Util=shuffle -e 'print shuffle(<STDIN>);' | |
} | |
function random_voice() { | |
voices | shuffle_for_stupid_osx_that_doesnt_have_it_built_in | head -n1 | |
} | |
function knock() { | |
v1=${1:-"$(random_voice)"} | |
v2=${2:-"$(random_voice)"} | |
echo "$v1 & $v2" | |
say -v "$v1" "Knock knock" | |
say -v "$v2" "Who's there?" | |
say -v "$v1" "Joe." | |
say -v "$v2" "Joe who?" | |
say -v "$v1" "Joe Mama." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment