Skip to content

Instantly share code, notes, and snippets.

@chris-roerig
Created November 8, 2018 18:13
Show Gist options
  • Save chris-roerig/1e137ab3bf74df42f2b2f79ed961d462 to your computer and use it in GitHub Desktop.
Save chris-roerig/1e137ab3bf74df42f2b2f79ed961d462 to your computer and use it in GitHub Desktop.
Ruby drum machine
ruby -e "tempo=(60_000/(ARGV[0].to_i||100));start=0;current=(Time.now.to_f*1000).to_i;while true do current=(Time.now.to_f*1000).to_i;if((current-start)>tempo);start=current;print\"\a\";end;end" 120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment