Skip to content

Instantly share code, notes, and snippets.

@ktravers
Created December 8, 2016 04:07
Show Gist options
  • Save ktravers/06de119c847adc4689cd4bb589e64ec3 to your computer and use it in GitHub Desktop.
Save ktravers/06de119c847adc4689cd4bb589e64ec3 to your computer and use it in GitHub Desktop.

Open your Mac Terminal and run the following commands.

Hint: you can run the commands by copying and pasting them into your terminal, then hitting the Enter/Return key.

Let It Snow

ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}'

Make Your Computer Talk

say 'Hello Brooklyn!'
say -v ?
say -v "Zosia" "Lalalalalalalalala" -o recording.mp4`
open recording.mp4
 
for voice in `say -v ?|cut -d" " -f 1`; do echo $voice; say -v $voice 'hamburgers'; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment