Ok so there are a few of these around and I was thinking about making a more compact one that ejects but for the moment I just needed a simple one that would attach to a table leg, so I designed this one
Can be printed without supports or a raft (I printed mine in PETG) and you should be able to push 2x 10mm round by 3mm thick neodymium magnets in to make it hold to anything magnetic