Press the “up” arrow twice
Press the “down” arrow twice
Press the “left” arrow once
Press the “right” arrow once
Press the “left” arrow once
Press the “right” arrow once
Press the “b” key
Press the “a” key

This, of course, is the famous Konami code for the Nintendo game Contra that gave you 30 lives at the start of the game instead of 3. That’s why you see 30 displayed everywhere on the left hand side in that screenshot.

By the way, if you want to turn off ninja mode, just do the same sequence and it returns to normal.