GitHubThis is a free repository (and version management system) for code samples. Just register and you're ready to create your first code sample (or gist as they are referred to). Of course Google Sites restricts what you can do, so although github provides a perfectly good piece of javaScript to embed a sample, you have to implement a gadget to host it. I came across this gadget from derquinse, so let's use that one. ExampleWe'll use the code sample for Simple implementation of R- melt to embed the code from this gist. Here is the XML file needed http://gadgets.derquinse.net/gist-github/gist-github-gadget.xml And it Works! Now my site will be automatically updated if I change the code. Using Google Apps ScriptAnother way is to use the caja prettifier wrapped up in Google Apps Script. You can read about how this works here. This time we use a simple iFrame gadget, and embed a URL like this http://xliberation.com/p/gaspubcontainer.html? source=gist&library= 3357942 Here is the same thing - See Get Started Snippets for more topics like this. In the meantime why not join our forum,follow the blog or follow me on twitter to ensure you get updates when they are available.
|
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Get Started Snippets >