Gist.GitHub

Gist.GitHub is an excellent way of sharing code snippets. Google Sites is a great tool to build web sites, including documentation web sites. However, Gists cannot be directly included in Google Sites pages, as script tags are not allowed. The solution? Well, we just have to wrap the code to embed a gist in a web page in a Google Gadget. So, to embed a gist in your Google Site page, you just have to:
  1. Insert a gadged by URL, specifying the Gist.GitHub gadget URL.
  2. Set the "Gist #" property to the desired gist number.
  3. Adjust the title checkbox and value (if desired). Gadget dimensions are supposed to adjust automatically, at least out of editing mode. 
The gadget is hosted on Google Code.

As an example, here is the gist containing an older version of the gadget source code:

Example Gadget Instance


And here a longer public gist:

Longer gist