Ah, now we're in my area of expertise. Come, step into my fictional textual office.
Let's get the repeats of the above out of the way first- caffeine is best used in moderation and with plenty of water spacing it out, because it will cause you to crash and dehydrate. Loud music and keeping yourself in a cold environment can be helpful, as it's harder to fall asleep under those conditions, but at around the 36-hour mark that will cease to matter. Expect mild auditory hallucinations, and as II2 mentioned, wanking is a bad idea. Above all, do not drive under these conditions.
Now, for my part? I swear by peppermints. Peppermints are great natural stimulants, aid in concentration, and they don't make you crash. The downside is that their boost is pretty short-term- it'll last five, ten minutes after the candy dissolves. A bit of peppermint oil rubbed on the temples or jaw (somewhere where the fumes can get into your respiratory system) will also work, if you can find it.
Small, frequent snacks that are high in carbs and protein are also extremely helpful- pretzels, nuts, whole-grain cereals, what-have-you. If you ever know in advance that you have to pull an all-nighter, I recommend starting the first day with a big omelet and a bowl of shredded wheat- the heavy meal will make you groggy in the short-term, but after it's digested you'll have energy when you need it.
The 10-20 minute power nap strategy is a bit dubious- it works if you can wake up on time, but that's a pretty big "if," especially after two nights in a row. Try it if you have a roommate who you can count on to shake you awake without mercy, but if you're relying on an alarm, it gets very easy to sleep through.
Lastly, if you feel the need to take a break from your project, make sure you do something during the downtime. Do a load of laundry, tidy up your workspace, take a walk, do a couple situps, but for the love of god, don't just sit idly, not matter how tempting it is.
Good luck, and try not to make a regular thing of this.