Skip to content

Instantly share code, notes, and snippets.


James jamesplease

Block or report user

Report or block jamesplease

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View devTools.js
define([], function() {
var breakOn = function(object, method) {
var originalMethod = object[method];
if (!originalMethod) {
throw new Error('Couldnt find method ' + method + ' to break on.');
return object[method] = function stopExecution() {
anonymous / gistbook.json
Created Nov 25, 2014
Anonymous Gistbook
View gistbook.json
{"title":"Anonymous Gistbook","author":"Anonymous","pages":[{"pageName":"","sections":[{"type":"text","source":"Welcome to Gistbook! This is anonymous"}]}],"public":true}
ianmetcalf / router.js
Created Dec 5, 2014
Chainable Async Router
View router.js
var ChainableRouter = BaseRouter.extend({
constructor: function(options) {
BaseRouter.apply(this, arguments);
this.options = options || {};
anonymous / what.js
Created Jul 9, 2015
View what.js
function checkForCompletion(event) {
// assumes source data in sheet named Needed
// target sheet of move to named Acquired
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = event.source.getActiveSheet();
var r = event.source.getActiveRange();
// Ignore edits on sheets other than the first sheet
if (s.getName() !== 'Sheet1') { return; }
thanpolas / Gruntfie.js
Last active Dec 26, 2015
Grunt Config for node server + livereload
View Gruntfie.js
module.exports = function (grunt) {
express: {
options: {
// Override defaults here
web: {
options: {
tbranyen / app.js
Created Sep 22, 2011
backbone.js sub routing
View app.js
/* Pretend app setup stuff is here */
/* Kick off app */
jQuery(function($) {
var Gallery = app.module("gallery");
app.Router = Backbone.Router.extend({
initialize: function() { = new Gallery.Router("gallery/");
tomdale / gist:3981133
Last active Apr 2, 2017
Ember.js Router API v2
View gist:3981133


This gist is outdated! For the most up-to-date information, please see!

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

brian-mann / gist:7085402
Last active Sep 3, 2017
The latest and greatest folder and file structure for Backbone / Marionette Apps
View gist:7085402
##Folder structure
##Inside Apps

A future version of Ember will come with a new templating engine known as HTMLBars.

The original motivation for HTMLBars was to allow helpers and properties to have better contextual information about what they were bound to.

So for example, consider a template like this:

<a href="{{url}}">{{link}}</a>
jcreamer898 /
Created Jul 13, 2012
Using amplifyjs as with RequireJS 2.0

Using AmplifyJS with RequireJS 2.0

With the lastest version of Require, a new config object was introduced, the shim.

That allows Amplify to now be used within AMD projects.

Have Fun!

You can’t perform that action at this time.