Skip to content

Instantly share code, notes, and snippets.

Jamie Kyle jamiebuilds

Block or report user

Report or block jamiebuilds

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
@jamiebuilds
jamiebuilds / gist:a6540f42a19d2ac8927f08ce5666309b
Created Mar 21, 2017 — forked from bestander/gist:a8a07724138a7e89392de1a795a82ef9
When I need to make sure that people are on the same build tool for a project
View gist:a6540f42a19d2ac8927f08ce5666309b
"scripts": {
"preinstall": "if [[ '$npm_config_user_agent' != *'yarn'* ]]; then echo 'Use Yarn!'; exit 0; fi"
}
View gistbook.json
{
"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": [
View radio.shim.js
(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';
View marionette.router-2.js
// Create our Application
var app = new Marionette.Application();
// Attach a router to it
app.router = new Marionette.Router({
channelName: 'myRouter',
states: {
'profile': {
url: 'profile',
@jamiebuilds
jamiebuilds / jquery.ba-tinypubsub.js
Last active Dec 22, 2015 — forked from rwaldron/jquery.ba-tinypubsub.js
Update jQuery bind/unbind to on/off
View jquery.ba-tinypubsub.js
/*!
* 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
*
View jquery.plugin-template.js
// 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
*
You can’t perform that action at this time.