Lifehacker has a little guide to replacing a dead power supply which is probably all fine and dandy - to be honest, I haven't read it, but in skimming the headings, I immediately fell for this little trick:
Step 3: Take "before" photos
So simple, yet so clever. No more "hmm, now where did this cable go?". Just a few quick snaps of what things looked like before you messed them up, and you'll be fairly sure to be able to put things back the way they were.