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 simple alarm for mac users. | |
# Usage: | |
# Paste this code in ~/.irbrc | |
# $ irb | |
# > alarm 10, "Noodles are ready!" | |
# > alarm 10, "Lunch at Marks", "Good" | |
# > alarm 10, "Go to the bank!", "Bad" | |
def alarm(minutes, message, voice = "Alex") | |
Thread.new do | |
sleep(60*minutes) |
NewerOlder