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
/** | |
* accepts n methods in sequence as arguments and returns a promise that is resolved | |
* once all methods finish. | |
* any argument may be an array of methods instead of a method itself. in this case, the array methods | |
* will be run in parallel | |
* any of the passed in methods may return a promise or any other type | |
* | |
* the results of the previous methods is handed over to the next method | |
* | |
* the last parameter may be an object containing one or both: {context, data} |
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 (doc, w) { | |
"use strict"; | |
var readyCallbacks = [], | |
docLoadEv = "DOMContentLoaded", | |
ready = (document.readyState === "complete"); | |
function registerForReadyEvent(fn) { | |
if (ready) { //already ready, execute immediately |
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
"%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i -new_console:a |
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
//IE9+ | |
(function () { | |
"use strict"; | |
function merge(){ //shallow copy | |
var root = arguments[0], fromObj; | |
for (var i = 1; i < arguments.length; i++) { | |
fromObj = arguments[i]; |
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
describe("root context", function(){ | |
before(function(){ | |
console.log("before: root"); | |
}); | |
beforeEach(function(){ | |
console.log("beforeEach: root"); | |
}); |
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
/** | |
* | |
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
* | |
* SEE MY venter NPM PACKAGE - https://www.npmjs.org/package/venter | |
* OR REPOSITORY ON GITHUB - https://github.com/yoavniran/node-venter | |
* | |
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
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 _selectorRgx = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/ ; //stole from jquery, to be used to quicken selector if simple class/id/tag selector used | |
/** | |
* stole the regex logic from jquery, added the support for classname selector starting with a number on IE8 | |
* for example selector = ".1111" will work with this code even on IE8 | |
**/ | |
function select(selector) { | |
var match = _selectorRgx.exec(selector), | |
doc = window.document, |
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
.myChart text { | |
fill: white; | |
font: 10px sans-serif; | |
text-anchor: end; | |
} | |
.axis text { | |
fill: black; | |
} |
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
"use strict"; | |
var crypto = require("crypto"); | |
var EncryptionHelper = (function () { | |
function getKeyAndIV(key, callback) { | |
crypto.pseudoRandomBytes(16, function (err, ivBuffer) { | |
var keyBuffer = (key instanceof Buffer) ? key : new Buffer(key) ; |