Someone I knew was throwing away this extension cable because the insulation had been damaged and the conductive metal cable was showing. Instead, I went to the hardware store, bought a relatively-inexpensive 3-wire 15amp,115v plug-end and made myself a new cable. Rather, two cables can be made from this 'hack' depending on how long the extension cable is and where the damage occurred; The same process can be repeated with the opposite end and the corresponding plug as well - if there is enough wire to warrant the cost of the plug.
First thing to do because it makes life easier down the road is disassemble the plug and put the rubber boot over the cable with the 'open end' facing towards where the plug would be coming out...
I used a side cutter to cut the unusable parts of the cable out. Then very carefully I used the utility knife to remove about 1" of the outer, green insulation. This was snipped away with the end-cutting pliers. Finally, about ¾" insulation from all three inner-cables was carefully removed.
The next step is to correctly attach the cables to the corresponding terminals in the plug. One of my old friends uses the term 'black gold' to remember the correct wiring, this is of course a North-American standard and will likely be different in other parts of the world. Nonetheless the black connector is connected to the gold-screw in the plug. Green denotes ground and white is neutral. Incorrectly wiring this could have very, very dangerous consequences and is essential that one knows what they are doing in order to avoid any fire, injury, death, etc... the power of electricity is not to be underestimated.
Finally, last but not least, it's important to re-attach that boot onto the plug because this will provide strain-relief for the internal junctures and of course insulate the connections from the outside world. And there you have it, a nice extension cable or two! However as a parting note, I must say I do prefer the square plug ends, they seem to fit a bit better into power bars and whatnot. These "Do it yourself" plugs tend to be slightly larger than the molded plugs you'll find but if it saves your otherwise unusable extension cord, it's surely a great option.