When My Alarm Was Found to Be Not Working
Due to some unfortunate events
- Loosing my phone
- K-alarm crashing
I faced a common problem for many people “No alarm to wake me up in the morning”. Like every single man, I love sleeping. So unless an alarm or person wakes me up, I will continue to enjoy sleeping - until the urge from my second passion (hunger) wakes me up.
Despite the fact that I love sleeping, my team mates at Ruby Kitchen, won’t be happy with me coming late to work. Challenged with such a problem, I did what every computer hacker would do.
Wrote a program to wake me up, at 6:00 AM 😁
Wrote a handy little Ruby program (Object Oriented, as I see the world as Objects), to wake me up at 6 AM. To play the music I used the system command of Ruby to run the vlc player with maximum volume (–volume [0..512]).
More that can be done
- make it accept command line arguments
- Maybe use libmplayer or ffmpeg so that there is no dependency on actual application
PS:- Just sharing to help those people who might find themselves in a similar problem as mine