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
/*Expected usage: | |
var swapFade = jc.swapFade.bind(this); | |
swapFade(this.statsFrame.card, card); | |
Or | |
this.swapFade = jc.swapFade.bind(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
var async = require('async'); | |
var operations = [ | |
function player1Mp(callback) { | |
setTimeout(function(){ | |
console.log("1"); | |
callback('fail', undefined); | |
}, 400); | |
}, | |
function player2Mp(callback) { | |
setTimeout(function(){ |
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
var jc = jc || {}; | |
if (!jc.isBrowser){ | |
function runBrowserMock(){ | |
window = jc; | |
jc.addEventListener = function(entry, method){ | |
method(); | |
} | |
jc.removeEventListener = function(){ |
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
set nocompatible | |
set history=700 | |
set backspace=indent,eol,start | |
set history=700 | |
filetype plugin on | |
filetype indent on | |
set wildmenu | |
set wildignore=*.o,*~,*.pyc | |
set ruler | |
set number |
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
# If stdin present, assume user meant cat | |
# | |
if [ ! -t 0 ] | |
then | |
cat "$@" | |
exit | |
fi | |
# Find the argument that is file/directory name and test it | |
# to find out if it is an existing directory. Other arguments are |
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
//global space | |
var MockDepedency = function(){} | |
MockDepedency.prototype.getValue = function(){ | |
console.log("What what what what!!!"); | |
} | |
function __setter(name){ | |
"use strict"; |
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
var MyClass = require("./classScope1.js"); | |
function setter(name, value){ | |
eval(name+"=value"); | |
} | |
MyClass.injectSetter(String(setter)); | |
MyClass.setter('fs', {}); | |
var myclass = new MyClass(); | |
myclass.go2(); |
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 dump(obj){ | |
while(obj!==undefined){ | |
for(var key in obj){ | |
log("j03m: " + key + " is " + obj[key].toString()); | |
} | |
try{ | |
obj = Object.getPrototypeOf(obj); | |
}catch(e){ | |
obj = undefined; | |
} |
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 test(){ | |
var a = function(){ console.log("called but ignored return"); return 7;}; | |
return a(), function(){ | |
console.log("if you do this, i hate you."); | |
return 5; | |
}(); | |
} | |
console.log(test()); | |
console.log("something"), console.log("somethingelse"); |
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
replace this: ((\w*)[\.\:\=\s]*function\s*(\w*)\(.*\)\s*\{) | |
with this: $1\tconsole.log\("$2$3"\);\n |
OlderNewer