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 assert = require('assert'); | |
module.exports.count = 0; | |
Object.keys(assert).forEach(function (k) { | |
module.exports[k] = function () { | |
assert[k].apply(undefined, | |
Array.prototype.slice.apply(arguments)); | |
++module.exports.count; |
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
* {font-family:monospace} | |
.g { text-align: center; font-size:36px } | |
.v { text-align: center; font-size:36px } | |
.l { margin:0;padding:0;color: black;} | |
.p { margin:0;padding:0;color: red; } | |
.r { margin:0;padding:0;color: 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
function Container() { | |
this.s = {}; | |
} | |
Container.prototype = { | |
put: function (i, v, o) { | |
return this.s[i] = !o ? v : function (p) { | |
return this.c = this.c || v(p); | |
}; | |
}, |
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 Transaction(data) { | |
this.paidIn = parseFloat(data.paidIn); | |
this.paidOut = parseFloat(data.paidOut); | |
this.balance = parseFloat(data.balance); | |
this.description = data.descritpion; | |
this.Date = data.date; | |
this.type = data.type; | |
} | |
//turm 'em all into CSV |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 start = 'HEAD'; | |
var end = 'fc402a5d37302265f87c77b2abe6cb06cde276b0'; | |
require('child_process').exec( | |
'git log --grep="\\[.*]" --no-merges ' + end + '~1..' + start, | |
function (error, stdout, stderr) { | |
console.log('stdout: ' + stdout); | |
console.log('stderr: ' + stderr); | |
console.log('exec error: ' + error); | |
}) |
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
fun! Require(...) | |
if !system("npm install " . join(a:000, " ") . " --save") | |
let result = [] | |
for dep in a:000 | |
call add(result, substitute("var x = require('x');\n", "x", dep, "g")) | |
endfor | |
put = join(result, '') | |
endif | |
endfunction | |
command! -nargs=* RQ call Require(<f-args>) |
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 Storage(config) { | |
this.store = config || {}; | |
} | |
Storage.prototype.put = function (key, object, params, done) { | |
done = done || params; | |
return done(null, this.store[key] = object); | |
}; | |
Storage.prototype.get = function (key, params, done) { |
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 diff = require('deep-diff').diff; | |
var yaml = require('js-yaml'); | |
var es = require('event-stream'); | |
var fs = require('vinyl-fs'); | |
var tokens = {}; | |
fs.src([ | |
"./modules/**/config/locales/en.yml", | |
"./modules/**/config/locales/ru.yml" | |
]).pipe(es.map(function (file, callback) { |
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 bufferpack = require('bufferpack'); | |
var net = require('net'); | |
var commands = { | |
DUMP_CFG : 1, | |
GET_CFG : 2, | |
SET_CFG : 3, | |
COMMIT_NVRAM : 4, | |
BRIDGE_ON : 5, | |
SPEED_TEST : 6, |
NewerOlder