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
function expandToken(input, scope) { | |
if (input && input.indexOf && input.indexOf('{{') >= 0) { | |
var re = /(?:\{?[^{]+)|(?:\{\{([^}]+)\}\})/g, | |
match, | |
ret = []; | |
function deref(token, scope) { | |
var segments = token.split('.'), | |
len = segments.length; | |
for (var i = 0; scope && i < len; i++) { | |
if (segments[i] !== 'this') { |
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
diff --git a/js/lib/backbone.historytracker.js b/js/lib/backbone.historytracker.js | |
index 9dbedd6..f9f4dc5 100644 | |
--- a/js/lib/backbone.historytracker.js | |
+++ b/js/lib/backbone.historytracker.js | |
@@ -100,6 +100,10 @@ | |
} | |
} | |
_navigate.call(this, fragment, options); | |
+ | |
+ if (!options || !options.trigger) { |
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
/*jshint node: true */ | |
var _ = require('underscore'), | |
Config = require('lumbar').config; | |
var queryStringParam = /^\?(.*)/, | |
namedParam = /:([\w\d]+)/g, | |
splatParam = /\*([\w\d]+)/g, | |
escapeRegExp = /[-[\]{}()+?.,\\^$|#\s]/g; |
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
#! /bin/sh | |
QUALITY=95 | |
DEPTHS="256 128 64 32 8 4 2" | |
totalSaved=0 | |
for name in `find "$1" -name "*.png" -not -name "*-fs8.png"`; do | |
output= |
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
#!/bin/sh | |
# Converts PDF files to TIFF files suitible for antiquated systems. | |
# Usage: | |
# $ pdf-to-tiff.sh file1 file2 | |
# | |
# Installation: | |
# $ brew install ghostscript | |
# $ brew install libtiff | |
# $ brew install --fresh --build-from-source imagemagick --with-libtiff | |
# |
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
{ | |
"name": "something-unique", | |
"mixins": { | |
"base": { | |
"scripts": [ | |
"global.js", | |
"base.js" | |
] | |
}, |
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
"use strict"; | |
var base = require("./handlebars/base"); | |
// Each of these augment the Handlebars object. No need to setup here. | |
// (This is done to easily share code between commonjs and browse envs) | |
var SafeString = require("./handlebars/safe-string")['default']; | |
var Exception = require("./handlebars/exception")['default']; | |
var Utils = require("./handlebars/utils"); | |
var runtime = require("./handlebars/runtime"); |
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
// Based on https://github.com/madrobby/zepto/blob/master/src/detect.js | |
// Zepto.js | |
// (c) 2010-2012 Thomas Fuchs | |
// Zepto.js may be freely distributed under the MIT license. | |
/*jshint asi: true, boss: true, curly: false, eqeqeq: false */ | |
module.exports = function($, ua){ | |
var os = $.os = {}, | |
browser = $.browser = {}; |
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 Hapi = require('hapi'); | |
// Create a server with a host, port, and options | |
var server = new Hapi.Server('localhost', 8001); | |
server.route([ | |
{ | |
path: '/failure', | |
method: 'GET', | |
config: { |
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
'passing': function (done) { | |
var a = function (self, x, callback) { | |
return callback(self, x + 10); | |
}; | |
var B = function () { | |
this.y = 10; | |
}; | |
B.prototype.go = function () { |
OlderNewer