This file contains 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
// usage | |
withAdvice.call(targetObject); | |
var withSomething = function() { | |
this.wrap('walk', function() { | |
// before | |
this.base(); | |
// after | |
}); | |
}; |
This file contains 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 press(key) { | |
document.getElementById("hplogo").onkeydown({ | |
keyCode:key, | |
preventDefault:function() { } | |
}); | |
} | |
var interval; | |
document.addEventListener('keydown', function(e) { | |
if (e.keyCode !== 96) |
This file contains 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
/** | |
* Provides: | |
* Function extend(Function parent, Object config); | |
* | |
* It extends constructors with it's methods | |
* Also provides to every method who overwrites another one | |
* with a this.base() method to invoke overwrote method. | |
* | |
* Created constructor has methods | |
* .extend(Object config) |
This file contains 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
Show hidden characters
{ | |
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme", | |
"rulers": [ 80, 120 ], | |
"highlight_line": true, | |
"trim_trailing_white_space_on_save": true, | |
"ensure_newline_at_eof_on_save": true, | |
"auto_complete_commit_on_tab": true, | |
"shift_tab_unindent": true, |
This file contains 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
Handlebars.JavaScriptCompiler.prototype.nameLookup = function(parent, name, type) { | |
var result = '(' + parent + ' instanceof Backbone.Model ? ' + parent + '.get("' + name + '") : ' + parent; | |
if (/^[0-9]+$/.test(name)) { | |
return result + "[" + name + "])"; | |
} else if (Handlebars.JavaScriptCompiler.isValidJavaScriptVariableName(name)) { | |
return result + "." + name + ')'; | |
} else { | |
return result + "['" + name + "'])"; | |
} | |
}; |
This file contains 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
define(function(require) { | |
var text = require('text'); | |
var view = require('view'); | |
var cache = {}; | |
function load(name, parentRequire, done, config) { | |
text.load(name, parentRequire, function(template) { | |
cache[name] = template; |
This file contains 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 extensions() { | |
function arr(val) { | |
return Array.prototype.slice.call(val); | |
} | |
function extend(Type, prototype) { | |
function E(val) { this.val = val } | |
E.prototype = prototype; | |
prototype.constructor = E; |
This file contains 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
/** | |
* Copyright © 2009-2012 A. Matías Quezada | |
*/ | |
(function(root) { | |
var undefined; | |
function extend(config) { | |
var parent = this; |
This file contains 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(root) { | |
var current = { | |
parent: null, | |
config: null, | |
}; | |
function clazz(name) { | |
function Class(config) { |
This file contains 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
/*globals define, module */ | |
//jshint camelcase: false, curly:false | |
(function(root) { | |
'use strict'; | |
// __proto__ will be used if supported | |
//jshint -W103 | |
function prototype_PROTO(parent, child, methods) { |
OlderNewer