We talked about it briefly this week in class, gist.github.com allows you to post code, have it be highlighted and allow others to edit that code. Here’s how you can use it:
- Name your file, this will help you keep record of your work and if you include the file extension (like .html / .css / .php) Gist will already do step 2 for you and highlight the text correctly.
- If you have not specified the file extension you can simply choose the language from this drop down menu to let Gist know how do you want it to highlight the code.
- Paste your code in directly from your text editor. Try to indent it well and keep it clean and tidy so it’s easy for others to read and possibly collaborate on it.
- If you save it as a public gist everyone can go in view it and edit it. Don’t worry, your original revision will be saved anyway.
- The Edit button will allow you to edit the code and save it as a new revision.
- You can download the code
- Enter a short description for what this code is supposed to do or even what is the problem you’re running into
- You can embed the code in our blog by grabbing the embed code and pasting it in the HTML tab of our post editor.
- The sidebar lists all of the revisions on this gist so you can browse through them (and no version is ever completely erased by the other – like in wikis)