I’ve fooled around with most of the major operating systems and Ubuntu is easily the most adaptive. It’s just made for users to fuck around with. So projects like this are possible, if not encouraged.
This Ubuntu wizard used a script to make the computer open and close the CD drive over and over again. But for what reason, you might be asking yourself? The main drive behind this invention, much like any innovation, was laziness. He didn’t feel like rocking his baby to sleep so he let his computer do it for him. The momentum of the drive keeps the baby rocking, just make sure the drive’s motor doesn’t burn out.
Link (Thanks Eran!)