Skip to content

Instantly share code, notes, and snippets.

// Create our Application
var app = new Marionette.Application();
// Attach a router to it
app.router = new Marionette.Router({
channelName: 'myRouter',
states: {
'profile': {
url: 'profile',
{
"title": "Lesson 2: Tasty Sandwiches",
"author": "jmeas",
"updatedAt": "2014-09-03T03:33:49Z",
"createdAt": "2014-09-02T20:11:40Z",
"public": true,
"pages": [
{
"pageName": "Some PageName",
"sections": [
@jamiebuilds
jamiebuilds / jquery.ba-tinypubsub.js
Last active December 22, 2015 01:59 — forked from rwaldron/jquery.ba-tinypubsub.js
Update jQuery bind/unbind to on/off
/*!
* jQuery Tiny Pub/Sub - v0.X - 8/31/2012
* http://benalman.com/
*
* Original Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*
* Made awesome by Rick Waldron and then even more by James Kyle
*
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['backbone.marionette', 'backbone.radio', 'underscore'], factory);
} else if (typeof exports !== 'undefined') {
module.exports = factory(require('backbone.marionette'), require('backbone.radio'), require('underscore'));
} else {
factory(root.Backbone.Marionette, root.Backbone.Radio, root._);
}
}(this, function(Marionette, Radio, _) {
'use strict';
@jamiebuilds
jamiebuilds / gist:a6540f42a19d2ac8927f08ce5666309b
Created March 21, 2017 08:23 — forked from bestander/gist:a8a07724138a7e89392de1a795a82ef9
When I need to make sure that people are on the same build tool for a project
"scripts": {
"preinstall": "if [[ '$npm_config_user_agent' != *'yarn'* ]]; then echo 'Use Yarn!'; exit 0; fi"
}
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
/**
* A modified (improved?) version of the jQuery plugin design pattern
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details.
*
* ADVANTAGES OF EITHER FRAMEWORK:
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
*