I recently joined Pinterest, and my favorite "pin" so far is this idea for a cord detangling solution for earbuds. There wasn't a tutorial online for the Chinese staircase, or spiral knot, technique - think friendships bracelets from junior high - so I'm posting one here. It does take an hour or so, and lots of embroidery floss, but it is well worth it to have snag-free cords every time you plug in to your device.
You will need floss about 3 times as long as the cord (including headphones).
Tie a simple knot with three strands of cord on the plug-in end of the cord.
To make the first knot in your ladder, time a half-hitch knot.
To begin, cross the thread under the cord and the other colored threads.
Next, cross the thread over the cord.
Next, cross the floss under the first loop.
Pull the thread tight. Every so often, push all the knots upward on the cord
to eliminate gaps.
For a more complete visual, check out this video on friendship bracelets.