Instead of emptying the controllerCode array when it gets to 10, we should instead pop the first element from the array. This means that the Konami Code will work during any combinations of key presses.
The keyup() method will now try to exit as early as possible. First, if controllerCode doesn't have a length of 10, it will return. Then the for loop will return as soon as it finds an invalid character. We no longer need the if statement before the for loop because controllerCode will have a length of 10 at this point. We also no longer need the bIsValid variable because the code can only get to opts.cheat() if controllerCode contains the Konami Code.
We can also compare the arrays without looping through it.
Compressed with http://refresh-sf.com/yui/ using the default options.