Inline code syntax highlighting in GitHub markdown?

Solution 1:

GitHub comments, wikis, README.md etc. use GFM, essentially CommonMark with some extensions. There it's not possible.

However, GitHub Pages uses Jekyll and by extension kramdown where you can use:

`x = 4`{:.ruby}

P.S. If you happen to use pandoc, the syntax is:

`x = 4`{.ruby}