If you have an Arduino with a damaged pin, but have the source code used in the Arduino and a spare unused pin in a shield, you can use a text editor to "resurrect" or at least "zombify" the damaged shield into active usefulness, even if the actual code is written for a different controller but is Duino compatible...
... It's just using 3 Find and Replaces on all instances in a pins.h file, it's a shotgun technique for swapping around two terms in a big document, but it works great even if you got conditional variables setup for different hardware. Probably a known technique, but I did a Google and couldn't find much if anything.
Original Forum posting (open source Reprap.org)
It's very applicable if you got a sick 3D printer on your hands on your hands with a damaged input or output. Or somebody else has. It won't repair the damaged unit, which should be replaced ideally, but it will get a damaged machine operational. :)