3 ms·
A script I use for this occasionally: #!/usr/bin/env ruby done = Time.now + ARGV[0].to_i while(true) do sleep(10) `say "Time's up!"` if Time.now
by jaggederest 13y ago
A script I use for this occasionally:
#!/usr/bin/env ruby
done = Time.now + ARGV[0].to_i
while(true) do
sleep(10)
`say "Time's up!"` if Time.now > done
end
Or the alarm clock version:
#!/usr/bin/env ruby
require 'time'
done = Time.parse(ARGV[0])
while(true) do
sleep(10)
`say "Time's up!"` if Time.now > done
end
- bodyfour 13y agoMy alarm clock 15 years ago was: $ sleep 28800; while :; do cat /etc/termcap; done > /dev/audio These days /etc/termcap is disappearing from UNIX machines, but back then it was always available. I found it had just the right amount of structure to make a really annoying noise.
- paulnechifor 13y agoMy occasional alarm clock is: $ sleep 8h; mpg123 <something>/pandemonic_hyperblast.mp3 There is no way to fail to wake up with this song http://www.youtube.com/watch?v=U5Den-CQ6jk http://www.youtube.com/watch?v=U5Den-CQ6jk .
- dllthomas 13y agoHeh, I've certainly done the same, albeit with different songs...
- noptic 13y agoI always used my stereos build in timer and a death metal CD for the same effect :) But now my stereo and my CDs gather dust and I (and my neighbours) do not miss them.
- Iuz 13y agowaking up to anaal nathrakh everyday would probably put me into depression after two weeks.