If you happen upon a piece of lego, or worse, an upturned plug whilst barefoot, try headbutting a wall.
This will obviously cause all pain receptors to engage at your forehead. Thus forgetting about the intense pain in the foot.
Its a well known ancient tradition.
Known as P.R.A.T (Pain Relocation Alternative Therapy)