My Mac power cord was frayed and the wiring was exposed at the wall wort. I reinforced the cord by cutting it, fitting some shrink tubing over the worn area, and soldering the cord back together.
-soldering gun & solder
-shrink tubing and heat source (lighter)
Step 1: Cut the Cord
Obviously, unplug the power cord first. I cut my cord about a foot from the wall wort and then stripped the cord to expose the wiring.
Step 2: Shrink Tubing
Slip the shrink tubing over the cut cord. I used three different sizes all gradually getting bigger in diameter to give the cord lots of support.
Step 3: Soldering
Before you do any soldering, make sure to slip some shrink tubing over the cord for use after you've soldered the cord back together. Solder the inner wires together first and then cover with shrink tubing. Then solder the outer wire together and cover with a larger diameter shrink tub.
Step 4: Plug It In, You're Done.
That's it. Super easy if you've ever soldered anything before.