Awhile back I had been messing around with batteries, copper wiring, compasses and small neodymium magnets; during this time I figured out how to flip the polarity of a compass needle. The most reliable way was to hold the two magnets above the compass needle and force, as best I could, the two repelling ends together towards the center of the compass needle. Once they were close enough to the center of the compass needle I would apply a breaking motion (like snapping a stick in two). And the compass needle would reverse. Also, doing this with both magnets attracting is considerably less reliable than when they are repelling. However the primary factor seems to be the breaking motion (whether forcing repelling ends towards the center, or letting attracting ends snap towards the center). Of course my question is how this works.