Geeky Way of Putting Your Baby To Sleep

Posted by jun auza On 10/09/2009
Are you tired of manually rocking your baby to sleep? If your answer is yes, then you should read on.

First, let me show you the code that you will use and break it down a bit.

For Linux users, you can use this simple shell script to automatically open and close the CD-ROM drive of your computer:


#!/bin/sh

while [ 1 = 1 ]
do
#eject CDROM
eject

#pull CDROM tray back in
eject -t
done


When you run that script, the CD tray will close and open forever and it can only be stopped by quitting the program manually.

So how will that help you put your baby to sleep? Just check out this video for some inspiration:




That was pretty cool, right?


For Windows users, this Vbscript will do the job just the same:

Set oWMP = CreateObject(”WMPlayer.OCX.7″ )
Set ArrCDROM = oWMP.cdromCollection
while (1)
wscript.sleep 3000
ArrCDROM.Item(0).Eject
wscript.sleep 3000
ArrCDROM.Item(0).Eject
wend


For those with Mac OS, you may use this:


#!/bin/sh
while true
do
sleep 3; drutil tray open
sleep 3; drutil tray close
done


If you have a more clever way of putting a baby to sleep, perhaps you can share it with us via comment :-)

Bookmark and Share

Related Posts:



9 Response to "Geeky Way of Putting Your Baby To Sleep"

  1. Mimor Said,

    I've seen this somewhere b4.
    Can't remember where, but it's awesome!

     

  2. Anonymous Said,

    It's a good example of how Linux amd Mac can do it with fewer lines of code .

     

  3. Very nice one...
    Just an optimization for the linux script: eject -T /dev/cdrom is the only thing needed, as it opens if closed and closes if open...

     

  4. Anonymous Said,

    Much better, and no scripting needed:

    http://simplynoise.com

    Out like a light!

     

  5. Anonymous Said,

    All-right, another use for cdrom drives. Some people use 'em as cup holders. Who uses a those things to read CDs or DVDs anyway?

     

  6. Anonymous Said,

    Will this work on my AuroraUX box?

     

  7. Even geeks should not forget the evening breast milk: it contains substances to send the baby to sleep (not daytime milk)!

     

  8. Anonymous Said,

    Sleeping in Maxi Cosi Car Seat is a very bad idea. This can cause back problems in the long run.

     

  9. Anonymous Said,

    shaker instrument, light "egg shaker" or heavier maracas, or rainstick work just fine. Try it, or record it and play in a loop.

     

Post a Comment

Archive


"Action is the real measure of intelligence" ~Napoleon Hill

Twitter

Tumblr

Google +