A discussion on the “No-Parse” option for posts in Discourse revealed that users can prevent HTML processing by using various formatting methods. omarfilip suggested using back-ticks to enclose code, selecting text and applying the preformatted text button, or using triple backticks to create a code block. pfaffman added that using four spaces before a line of text also achieves this effect. However, codinghorror noted that fenced code blocks imply source code and enable colored syntax highlighting, making them distinct from the four-space method.
I recommend indenting by 4 spaces, unless you need syntax color highlighting (e.g. you are posting literal computer source code of some kind like Fortran or HTML).