- Browse to https://gist.github.com/
- Add a Gist Description (optional)
- Add a filename with an extension (extension will be used to add syntax highlighting)
- Add your code snippet which need to be added to your blog post
- Click “Create Public Gist” button at the botton
- Click on the “embed” link and copy the script generated
This is all from Gist side. Now to Blogger,
7. Paste the script where you need to add the code snippet
8. Make sure to select the option “Interpret typed HTML” under Post Options -> Compose Settings
Here is how an example Java code looks like after this 8 Steps above,