Skip to content

Instantly share code, notes, and snippets.

View Filirom1's full-sized avatar

Romain Filirom1

View GitHub Profile
@Filirom1
Filirom1 / Instructions
Created November 25, 2011 09:51 — forked from temsa/Instructions
tar.spec for getting tar 1.26 on Centos5
yum install sudo man unzip curl gcc-c++ screen rpm-build gettext-devel
mkdir -p /usr/src/redhat/SOURCES
mkdir -p /usr/src/redhat/SPECS
curl -sR -o /usr/src/redhat/SPECS/tar.spec https://raw.github.com/gist/1241902/tar.spec
curl -sR -o /usr/src/redhat/SOURCES/tar-1.26.tar.bz2 ftp://ftp.gnu.org/gnu/tar/tar-1.26.tar.bz2
rpmbuild -ba /usr/src/redhat/SPECS/tar.spec
@Filirom1
Filirom1 / gist:2436310
Created April 21, 2012 10:06 — forked from beatgammit/gist:1871760
Vows breaks on nested topics
(function () {
'use strict';
var vows = require('vows'),
assert = require('assert');
vows.describe('some test').addBatch({
'test level 1': {
topic: function () {
this.callback(null, 1);
@Filirom1
Filirom1 / README.md
Created April 28, 2012 11:45 — forked from vvo/gist:2488897
mem leak ? without google

Without doing a DOS on Google it still leaks:

http://i.imgur.com/tnk7w.png

[romain@myhost trace-memory-leaks]$ node --expose-gc gistfile1.js
We should do 5 requests
3MB used
Done: 0/5, not yet GC: 0
24MB used

Done: 5/5, not yet GC: 5

@Filirom1
Filirom1 / README.md
Created April 30, 2012 17:15 — forked from vvo/gist:2488897
mem leak ? with socket hang up

An other memory leak with socket hang up

# node --expose-gc leak.js
webkit-devtools-agent started on 127.0.0.1:1337
We should do 18 requests
3MB used
Done: 0/18, not yet GC: 0
Got error: socket hang up
Got error: socket hang up

Got error: socket hang up

@Filirom1
Filirom1 / README.md
Created May 2, 2012 15:36 — forked from vvo/gist:2488897
mem leak ? with setTimeout

I am actually playing on the branch https://github.com/joyent/node/tree/http-memleak

Without setTimeout it works like a charm,

node --expose-gc gistfile1.js
webkit-devtools-agent started on 0.0.0.0:1337
We should do 18 requests
3MB used
Done: 0/18, not yet GC: 0

Got error: socket hang up

@Filirom1
Filirom1 / README.md
Created May 3, 2012 08:28 — forked from vvo/gist:2488897
mem leak ? on('error', function(){

http.get + req.on('error', function(){}) seems to provoke a memory leak:

node --expose-gc leak.js
We should do 5 requests
2MB used
Done: 0/5, not yet GC: 0
26MB used
Done: 5/5, not yet GC: 5
all requests done, memory should be collected by now ?

26MB used

@Filirom1
Filirom1 / leak.js
Created May 3, 2012 17:27 — forked from vvo/gist:2488897
mem leak ? timeout and onError with a working HTTP Server
node --expose-gc leak.js
webkit-devtools-agent started on 0.0.0.0:1337
We should do 18 requests
3MB used
Done: 0/18, not yet GC: 0
Got error: undefined
Got error: undefined
Got error: undefined
Got error: undefined
Got error: undefined
@Filirom1
Filirom1 / README.md
Created July 3, 2012 17:31 — forked from kembuco/run-mocha.js
JavaScript: PhantomJS Mocha Scrapper

moved here

@Filirom1
Filirom1 / static_server.js
Last active December 12, 2015 09:39 — forked from ryanflorence/static_server.js
static server using streams
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@Filirom1
Filirom1 / Test.class
Created February 20, 2018 08:35 — forked from nogweii/Test.java
A quick test to see if you have the JCE Unlimited Strength Jurisdiction Policy files installed. If you don't, in Java 6 you'll see 128. If you do, you'll see 2147483647. Thanks to http://stackoverflow.com/questions/11538746/check-for-jce-unlimited-strength-jurisdiction-policy-files