In order to use this code, you will need to copy gears.scad to your Libraries folder. https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries
And then you can run Untitled.scad as any other normal scad project file.
If you don't want to mess around with the library, just combine the two code files together into one.