Skip to content

Instantly share code, notes, and snippets.

View papandreou's full-sized avatar
💭
🤗

Andreas Lind papandreou

💭
🤗
View GitHub Profile
@papandreou
papandreou / gist:818a6ffd729697ed6359f9abbdc7100d
Last active May 23, 2016 16:48
papandreou/sharp-mem-usage, fiddleAround branch (@aca1eb9b) WITH SINGLE BUFFER-BASED BASED INPUT AND JEMALLOC
$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
---> Using cache
---> e142b8b8c5c2
@papandreou
papandreou / gist:b71e0f336bf709e743c0889a3db96cb6
Created May 17, 2016 12:18
papandreou/shap-mem-usage, fiddleAround branch (@e01e4c3c) WITH FILE BASED INPUT AND JEMALLOC
[fiddleAround e01e4c3] Use file-based input.
1 file changed, 6 insertions(+), 11 deletions(-)
[sharp-mem-usage]$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
@papandreou
papandreou / gist:ef7543f1b79f7d8857c84d0632ec143c
Created May 17, 2016 12:09
papandreou/shap-mem-usage, fiddleAround branch (@a53ac5ba) WITH JEMALLOC
$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
---> Using cache
---> e142b8b8c5c2
@papandreou
papandreou / output
Created May 17, 2016 09:13
papandreou/shap-mem-usage, fiddleAround branch (@e56f2b0d)
$ make tests
docker-compose rm -f
No stopped containers
docker-compose build
Building test...
Step 0 : FROM centos:7.2.1511
---> 83ee614b834e
Step 1 : RUN yum install -y epel-release && yum -y clean all
@papandreou
papandreou / gist:e8fbd50782e8c5d0b22f5fcf1ba1cc37
Created April 13, 2016 07:53
unexpected-mitm@master (1553297) npm test output
[unexpected-mitm]$ npm test
> [email protected] test /home/andreas/work/unexpected-mitm
> mocha --compilers md:unexpected-markdown test/*.js `find documentation -name '*.md'` && npm run lint
unexpectedMitm
✓ should mock out a simple request
✓ should mock out a request with a binary body
@papandreou
papandreou / error.txt
Created March 14, 2016 09:12
duplicated Unexpected error message
2) express-processimage when sharp is available should support rotate with a single argument for gm:
expected 'GET /bulb.gif?rotate=90' to yield response
{
headers: { 'X-Express-Processimage': 'gm' },
body: expect.it('to have metadata satisfying', { format: 'GIF', size: ... })
.and('to resemble', '/home/andreas/work/express-processimage/testdata/rotatedBulb.gif')
}
GET /bulb.gif?rotate=90 HTTP/1.1
@papandreou
papandreou / afterTest.js
Created January 1, 2016 22:19
Attach after and afterEach inside it block
it('should foo', function () {
console.log("it foo");
after(function () {
console.log("after foo");
});
afterEach(function () {
console.log("afterEach foo");
});
});
function parseType(str) {
return str.split('|').map(function (typeDeclaration) {
var varargs = /^\.\.\./.test(typeDeclaration);
if (varargs) {
return { varargs: typeDeclaration.substr(3) };
} else {
return typeDeclaration;
}
});
}
#!/usr/bin/env node
/*global JSON*/
var childProcess = require('child_process');
var async = require('async');
var passError = require('passerror');
var commandLineOptions = require('optimist').demand(1).argv;
var results = [];
var refs = commandLineOptions._;
@papandreou
papandreou / observable.js
Last active September 11, 2015 15:15
Stripped down version of ko.observable with all the prototype trickery
function setPrototypeOf(obj, proto) {
obj.__proto__ = proto;
return obj;
}
var canSetPrototype = ({ __proto__: [] } instanceof Array);
var setPrototypeOfOrExtend = canSetPrototype ? setPrototypeOf : function extend(target, source) {
if (source) {
for (var prop in source) {