The coolest hack (and it's not really a hack in the true sense of the word, but it passes as well as some of the above answers) I've ever created was on my Apple //e.
There was one line in the reference manual that said $C010 was the 'any key down' flag.
Which it turned out was true. The high bit of the $C010 soft switch would tell you if a key was down or not despite the built-in key repeat hardware.
What they didn't tell you and everybody found out the hard way was that there was no reliably way to find out WHAT key was being pressed.
If you wrote a little assembly program... (pardon my mistakes, my 6502 assembly is a lot rusty)
:1
lda $C010
cmp #$80
bcc :1 ; branch if less than? I forget how to do that.
lda $C000
jsr $FDF0 ;output the accumulator value to the screen
So it would loop until you pressed a key and would output the key by loading from the $C000 keyboard read switch.
But if you ran that program, it wouldn't quite work right.
It would certainly print out something while you were holding a key down and nothing when you weren't but there was a little lag on the bus somewhere (I think, I'm not a hardware guy) so if you pressed 'f' you'd get lots of f's. But if you stopped, then pressed 'g', you'd get a bunch of 'f's before it switched to 'g'.
You could see evidence of this problem in the apple ][ version of Gauntlet, you'd move in one direction, and if you tried to move in a second direction, you'd move a little bit in your original direction until the you passed the lag.
It made no sense really, because reading $C000 was always 100% accurate, unless you pinged $C010 first.
I found this problem fascinating and after weeks of playing I finally came up with what I still think is the coolest program I've ever written.
The program itself made no sense, it did a few useless ORA's but for some reason it worked, and it yielded correct values from $C000 after querying $C010.
So cool was this, I wrote an article for nibble magazine, which they accepted but never published (either because they went out of business or because the article read like it was written by 15 year old, which it was) where I wrote a replacement keyboard input program and hooked it into the zero page location that everybody calls to get keyboard input and I was able to programmatically change the keyboard repeat delay and repeat rate, something that was otherwise impossible as it was wired into the hardware.
Of course the Apple //e was on its way out at that point, but still to this day, my coolest hack.
Update 3/2/2010: Going through some old papers, I found a printout of my little assembly routine. I'm posting it here to see if anybody can figure out why it works, and so it will be forever enshrined in digital form somewhere...
$0300 AD 10 C0 LDA $C010 ; load accumulator with any-key-down flag
$0303 29 80 AND #$80 ; keep only high bit flag
$0305 0D 00 C0 ORA $C000 ; OR accumulate with keyboard soft switch
$0308 10 F9 BPL $0303 ; erm, I forget exactly which branch this is
$030A 09 80 ORA #$80 ; turn the high bit on
$030C 20 ED FD JSR $FDED ; print char in accumulator
$030F 4C 00 30 JMP $0300 ; start again.
Makes no sense why this should work, but it does. Or did. 25 years ago.