Here's how I made a modern extension cord for my desk with built in USB ports.
Step 1: Tools and Materials
I used these parts for my outlet, but you don't have to use these exact parts. This is just a general guideline
Other Cord Options:
Red Cord with Plug
You'll also need:
Drill bit (6mm or 1/4" or whatever the diameter of your cord is)
Step 2: Prep the Electrical Cord
Remove the cover plates from the USB Receptacle. From there take your power cord and figure out how much of the jacket you need to strip. Use electrical tape to wrap where you're going to strip the electrical cord otherwise your cloth cord will fray. Then strip about 1-1.5" of the inner wires.
If your cord didn't come with a grounded plug pre installed. Install that part too.
Step 3: Feed Cord Into the Box
Now take your wine cork. Cut it in half with your knife and drill it out to the diameter of your electrical cord (I just hand drilled it with a 1/4" drill bit, but a cordless drill will work just fine). Make sure the cork fits snugly around the cord, as this acts as your strain relief. Feed that around the power cable and feed all that through one of the the gang box openings
Step 4: Wire the Outlet Receptacle
This will change if you use a different outlet receptacle, just consult the documentation that comes with your outlet. But on the wiring Black is Hot, White is Neutral and Green is ground.
This is also a great time to test the outlets before closing everything up.
Step 5: Close It Up.
Screw the receptacle into the gang box and add the top plate back on and you're done. You can get super creative with your color combos ands its very easy to paint the covers and box different colors. Just make sure you do that before you assemble.