Monday, March 24, 2014

Another way to post code snippets!

Bam.

--Here is an example of a code-snippet using github's awesome markdown(ing lol ).
--
function Hey_Lady()
print( "How's it goin Ms.Thang?" )
end
Hey_Lady()
view raw gistfile1.lua hosted with ❤ by GitHub
A great way to host/post code snippets is to use Github+Gist.

In short, you create a file with some code formatting, and then copy the embed link to post on your blog. It's really simple and really fast.

Here's my steps for getting from A to Z:

  1. Sign up or sign in to github.
  2. Go to the uber top of the page and click "gist".
  3. Write your code into the file.
  4. Select the file type to match your code.
  5. Save.
  6. On the left of the page will be the embed link.
  7. Copy that link and paste it as HTML in your blog post.
That's it.

In Blogger, I don't see the Gist until I "Preview", so keep that in mind.