Skip to content

Instantly share code, notes, and snippets.

View Stray's full-sized avatar

Stray Stray

  • Innerleithen, Scotland
View GitHub Profile
# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples
@jonnyreeves
jonnyreeves / index.html
Created April 23, 2012 21:38
JavaScript Class Structure using requireJS. The following code shows you how to create a Class definition in one JavaScript file and then import it for use in another; coming from an ActionScript 3 background this (and some of JavaScript specific traits)
<!DOCTYPE html>
<html>
<head>
<script data-main="usage" src="http://requirejs.org/docs/release/1.0.8/comments/require.js"></script>
</head>
<body>
<p>Check your JavaScript console for output!</p>
</body>
</head>
@creynders
creynders / 1.obj.js
Created March 31, 2012 06:51
JavaScript generic inheritance methods
var Obj = {
createProxy : function( o ) {
var F = function () {
};
F.prototype = o;
return F;
},
createObject : function( o ){
//Crockford Object.create
var F = Obj.createProxy( o );
@benbjohnson
benbjohnson / EmbedExample.as
Created December 10, 2010 21:38
Pure AS3 Text File Embed
package
{
import flash.display.Sprite;
import flash.text.TextField;
[SWF(width="800", height="600")]
public class EmbedExample extends Sprite
{
public function EmbedExample()
{