Head bob ? JavaScript

Hello Unity Answer Community,
How do you go about scripting a Head Bobbing script for the main camera ?

Thank you for your time.

http://wiki.unity3d.com/index.php/Headbobber