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 should = require('should'); | |
var assert = require('assert'); | |
var superagent = require('superagent'); | |
describe('app', function() { | |
var agent = superagent.agent(); | |
before(loginUser(agent)); | |
describe('GET', 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 im = require('imagemagick'); | |
var sharp = require('sharp'); | |
var path = require('path'); | |
var LOOPS = 1000; | |
var cscreen = ''; | |
var $scope = this; | |
var timings = { | |
start: { test1: { sharp: 0, imagemagic: 0 } }, |
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 fs = require('fs'); | |
var path = require('path'); | |
var async = setImmediate ? setImmediate : process.nextTick ? process.nextTick : setTimeout; | |
module.exports = function(dir, mode, cb) { | |
var wqueue = []; | |
dir = path.resolve(dir); |
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
{[{<<"arr">>,[1,2,3,4]}, | |
{<<"arrStr">>,[<<"a">>,<<"b">>]}, | |
{<<"arrobj">>,[{[{<<"a">>,1},{<<"b">>,2}]}]}, | |
{<<"obj">>, | |
{[{<<"key1">>,<<"payload1">>},{<<"key2">>,<<"payload1">>}]}}, | |
{<<"testBool">>,true}, | |
{<<"testInt">>,1}, | |
{<<"testStr">>,<<"abc">>}, | |
{<<"testReal">>,1.2}]} = jiffy:decode(<<" | |
{ |
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 obj(o) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
return (function __get(o, args) { | |
var key = args.shift(); | |
if(key !== undefined) return __get(o[key] || { }, args); | |
return o; | |
})(o, 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 safeObj(obj) { | |
return (function obj() { | |
var args = Array.prototype.slice.call(arguments, 0); | |
return (function __get(obj, args) { | |
var key = args.shift(); | |
if(key !== undefined) return __get.call(this, obj[key] || { }, args); | |
return obj; | |
}).call(this, this, args); | |
}).bind(obj || {}); | |
} |
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
module.exports = function json2xml(obj) { | |
var str = ''; | |
for(var key in obj) { | |
str += __json2xml(key, obj[key]); | |
} | |
return str; | |
}; | |
function __json2xml(parrent, props) { |
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 fs = require('fs'); | |
var path = require('path'); | |
var safeObj = require('./safeObj'); | |
module.exports = function JsonStore(name, filestoreDir) { | |
var self = this; | |
var sourceData = { }; | |
var loopPtr; |
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'; | |
module.exports = function allochron(funcs, onComplete, limit) { | |
funcs = typeof funcs === 'function' ? [funcs] : funcs; | |
limit = limit || 3; | |
var scope = this; | |
var length = Object.keys(funcs).length; | |
var shouldRun = {val: true}; | |
var counter = {i: length}; |
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 setjdk() { | |
if [ $# -ne 0 ]; then | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
if [ -n "${JAVA_HOME+x}" ]; then | |
removeFromPath $JAVA_HOME | |
fi | |
export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
export PATH=$JAVA_HOME/bin:$PATH | |
fi | |
} |
OlderNewer