Use four spaces before your code?
Or use double backticks:
See http://daringfireball.net/projects/markdown/syntax, linked to from the formatting question box.
Note: Extra spacing will be necessary if you want to have a backtick at the end of your code, e.g.,
foo` . This will keep it from consuming the first 2 closing backticks instead of the final two closing backticks.