Skip to content

Instantly share code, notes, and snippets.

View epappas's full-sized avatar
👨‍💻
I'm Building Something Interesting :)

Evangelos Pappas epappas

👨‍💻
I'm Building Something Interesting :)
View GitHub Profile
@epappas
epappas / jiffy.json.erl
Created June 14, 2014 12:47
An example of use of jiffy
{[{<<"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(<<"
{
'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);
@epappas
epappas / sharp-vs-imagemagic.js
Created May 28, 2014 15:43
a benchmark to test how faster sharp is
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 } },
@epappas
epappas / test-stub.js
Created May 12, 2014 11:15
mocha test stub
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() {