This is what I've used to let me securely mount my arduino + motorshield onto the top edge of my polargraph machine. My machine board is 18mm chipboard, so the bracket is designed to fit onto that. The pair of brackets will hold an arduino (uno or mega) by the top and bottom edges of the board. It's in two parts so that it can be printed more reliably (no tall towers), and to make space for an elastic band to hold the motorshield on if it's a bit loose.
The second version (arduiono uno holder flat) has a flat base, like a regular stand, to stand the arduino on it's edge. This can just sit on top of a surface, like a narrow shelf.