This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Backbone sessionStorage Adapter | |
| * Based on https://github.com/jeromegn/Backbone.localStorage | |
| */ | |
| (function() { | |
| // A simple module to replace `Backbone.sync` with *sessionStorage*-based | |
| // persistence. Models are given GUIDS, and saved into a JSON object. Simple | |
| // as that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin retina { | |
| /* Target any and all high-density screens on any browser currently known (October 2012) */ | |
| @media (min--moz-device-pixel-ratio: 1.5), | |
| (-o-min-device-pixel-ratio: 3/2), | |
| (-webkit-min-device-pixel-ratio: 1.5), | |
| (min-resolution: 1.5dppx) { | |
| @content; | |
| } | |
| } |
Couldn't find the text of this for a while...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'), | |
| httpProxy = require('http-proxy'), | |
| app = express(); | |
| var proxy = new httpProxy.RoutingProxy(); | |
| function apiProxy(host, port) { | |
| return function(req, res, next) { | |
| if(req.url.match(new RegExp('^\/api\/'))) { | |
| proxy.proxyRequest(req, res, {host: host, port: port}); |
The spec has moved to a repo: https://github.com/defunctzombie/package-browser-field-spec to facilitate collaboration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void function() {//closure | |
| var global = this | |
| , _initKeyboardEvent_type = (function( e ) { | |
| try { | |
| e.initKeyboardEvent( | |
| "keyup" // in DOMString typeArg | |
| , false // in boolean canBubbleArg | |
| , false // in boolean cancelableArg | |
| , global // in views::AbstractView viewArg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This small hack loads fonts from the Typekit webfontloader (https://github.com/typekit/webfontloader) | |
| contextually, effectively "patching" in a new font if a media query is fired. | |
| You need to have 2 seperate kits on Typekit, one for your main fonts, and another for the fonts you want | |
| when the media query is fired. | |
| Improvements or suggestions welcome! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example browserify transform which precompiles Jade | |
| // templates including them in the bundle, allowing you | |
| // to use: | |
| // var tmpl = require('./templates/template.jade'); | |
| // | |
| // Supports layouts and blocks | |
| // | |
| // requirements: | |
| // npm install jade through | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //= require ../collections/children.js | |
| (function($){ | |
| demo.models.Parent = Backbone.Model.extend({ | |
| initialize: function(options) { | |
| this.children = new demo.collections.Children(); | |
| this.attributes = this.parse(this.attributes); | |
| } | |
| , exampleJSON: { | |
| someAttr: 'some value' |