Thanks for sharing your solution. As for readability, it helps to put commands etc. in single grave accents (`) to highlight them and use a fixed-width font like this.
See the Markdown syntax for more formatting options. It's also linked at the upper right corner of the input area of a new post (the small grey "compose").