Late-Night Hacking Gist

Let’s see if I can embed the Gist here (in case I can’t, here’s the direct link):

(Can’t really take credit for this, though. Got it off of someone on StackExchange. I’ll link to the post if I still have it open in one of my… eleven open browser windows. But at the moment, I’m a little too brain-dead to hunt it down.)