i followed the same basic idea as this tutorial but i did make some changes-i used an elastic band instead of ribbon (because, for whatever reason, when i tie ribbon it never stays the way i tied it) and i boxed the corners of the front piece to make it sit more flat against my machine (rather than a small pillow tied to it).
-elastic ( used 1" but you could go a bit narrower)
now for the cushion-you can make it whatever size you want but i think a narrow strip across the front of the machine works best. so the width if my machine where i want the pincushion to be measured 4" and i wanted it to be 2" tall, add seam allowances, and i cut a 5" x 3" rectangle. this will be the back of the cushion. for the front, i added an extra inch to each side and cut a 6" x 4" rectangle. cut interfacing for the front and back pieces if you want-i went with a sheer weight fusible interfacing.
to make the casing for the elastic, sew the 2 long strips together with the right sides facing in. i sewed roughly 1 1/4" apart just to make sure i could fit the elastic in there. flip inside out and press. it helps to place a safety pin on one end and work it back through.
now put the elastic inside the casing (using a safety pin is helpful here too) and use a zig zag stitch to hold the elastic in place on each end.
next sew the ends of the elastic on the right side of the back of the cushion (the smaller rectangle)-make sure there aren't any twists in the elastic. you will want to center them on the 3" sides (or the shorter side) of the rectangle.
now, on the 6" x 4" rectangle, or the front of the cushion, make a mark 1" away from each corner in both directions.
fold each corner in half so that the 2 marks line up and sew down perpendicular to the fabric edge. trim away the excess fabric.
now sew the front piece to the back piece, right sides together. leave a small opening on a side that does not have the elastic strap. when you come to the corners, sew as close as you can to the corner stitches, lift the foot, turn your fabric, replace foot and keep sewing.
flip inside out, stuff, and slip stitch shut. i didn't have any stuffing so i just used some leftover poly batting-i think it's somewhat lumpier than if i had used stuffing but it gets the job done.
and now you have a pincushion for your sewing machine!! i can even move mine around...