Skip to content

Instantly share code, notes, and snippets.

🍕
please

James jamesplease

🍕
please
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() {
debugger;
anonymous
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
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 || {};
this._initRoutes();
},
anonymous
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
thanpolas / Gruntfie.js
Last active Dec 26, 2015
Grunt Config for node server + livereload
View Gruntfie.js
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
express: {
options: {
// Override defaults here
},
web: {
options: {
@brian-mann
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
/backbone
app.js
/apps
/entities
/lib
##Inside Apps
/apps
View htmlbars.md

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
jcreamer898 / README.md
Created Jul 13, 2012
Using amplifyjs as with RequireJS 2.0
View README.md

Using AmplifyJS with RequireJS 2.0

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

http://requirejs.org/docs/api.html#config-shim

That allows Amplify to now be used within AMD projects.

Have Fun!

View deploy-to-now.sh
#!/bin/bash
browser=$1
if [ -z "$browser" ]; then
echo "Usage: ./deploy.sh <browser>"
exit 1
fi
set -euo pipefail
# Copy the right files
View .bach_profile
Johann Sebastian Bach (31 March [O.S. 21 March] 1685 – 28 July 1750) was
a German composer and musician of the Baroque period. He enriched established
German styles through his skill in counterpoint, harmonic and motivic
organisation, and the adaptation of rhythms, forms, and textures from abroad,
particularly from Italy and France. Bach's compositions include the Brandenburg
Concertos, the Goldberg Variations, the Mass in B minor, two Passions, and over
three hundred sacred cantatas of which nearly two hundred survive. His music
is revered for its technical command, artistic beauty, and intellectual depth.
http://en.wikipedia.org/wiki/Johann_Sebastian_Bach
You can’t perform that action at this time.