Created
February 23, 2009 21:23
-
-
Save levinalex/69184 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
# | |
# say a random word from the dictionary at least every ~n seconds | |
# | |
# uses "say" (comes with OSX) and growlnotify (comes with growl) | |
$f = File.open("/usr/share/dict/words") | |
$interval = ARGV[0].to_f || 0 | |
$f.sort_by{rand}.each do |l| | |
word = l.strip | |
`growlnotify -a Dictionary -m #{word}` | |
`say #{word}` | |
sleep rand($interval) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment