This turns standard square-pin breakaway headers into latching headers. The standard 4-pin size will fit the CD-ROM audio cables like the ones used for the Gen 4 mechanical endstops. I designed a version to print horizontally and one to print vertically. This has nothing to do with mounting options, but you will probably find that one of these is easier to print on your machine than the other.
Print the vertical or horizontal version (tip: the skeinforge Multiply plugin will make multiples, which will also give the parts time to cool and result in better quality). Make sure the cable connector fits and latches correctly, then insert a 4-pin header (number of pins is configurable in the scad files) and glue it in place.