A simpe open scad library to generate pcb stand offs. Three types can be generated
Plain (round or hex)
Retained Nut (round or hex)
A Split Pillar, use a dab of hot glue or adhesive tape to hold it down.
Edits
v1.1 - made split_base slightly more printable, added example .STL output
v1.2 - added support for captured nut version