I hereby claim:
- I am nicokaiser on github.
- I am nicokaiser (https://keybase.io/nicokaiser) on keybase.
- I have a public key whose fingerprint is 653E FE2F 98D5 3D04 D41C E0F2 8CA2 3480 C02A 6A60
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var mongodb = require('mongodb'); | |
// This example selects all documents of a collection and checks if they should be displayed. | |
// 15 documents should be displayed, but I have to select all from the DB because maybe | |
// myCheckFunction returns true only for the last 15 elements selected (if any). | |
// So at some point (if I have seen enough documents) the DB can stop sending me documents, | |
// i.e. not fetch another batch of 30 documents in this case. | |
var db = new mongodb.Db('mydb', new mongodb.Server('localhost', 27017, {})); |
var util = require('util') | |
, WebSocket = require('websocket-server').WebSocket; | |
var CONCURRENCY = 200; | |
var SERVER = 'ws://localhost:3000/'; | |
for (var i = 0; i < CONCURRENCY; i++) { | |
createConnection(); | |
} |
var http = require('http') | |
, net = require('net') | |
, util = require('util') | |
, wsio = require('websocket.io'); | |
var server = http.createServer(function (req, res) { | |
res.writeHead(200, { 'Content-Type': 'text/html' }); | |
res.end('ok'); | |
}); |
/** | |
* The client opens 10,000 connections to the server and sends one 10k message. | |
* Every minutes, 2,000 new connections are openend and 2,000 random connections | |
* are closed (equally distributed interval). | |
*/ | |
var util = require('util') | |
, WebSocket = require('ws'); | |
// Config |
// run with "node --expose_gc" | |
var weak = require('weak') | |
, util = require('util') | |
function MyObject () { | |
var self = this; | |
Object.defineProperty(this, 'color', { | |
get: function() { return 'red' } | |
}) |
var http = require('http') | |
, weak = require('weak') | |
var server = http.createServer(function(req, res) { | |
if (req.method == 'GET') { | |
// GET | |
console.log('GET request') | |
weak(req, function() { console.log('GET request collected by GC') }) | |
res.end() |
#!/usr/bin/perl | |
$_=shift@ARGV;s/Mↂ/+9000/g;s/Mↁ/+4000/g;s/CM/+900/g;s/CD/+400/g;s/XC/+90/g;s/XL/+40/g;s/IX/+9/g;s/IV/+4/g;s/ↂ/+10000/g;s/ↁ/+5000/g;s/M/+1000/g;s/D/+500/g;s/C/+100/g;s/L/+50/g;s/X/+10/g;s/V/+5/g;s/I/+1/g;/^[0-9\+]*$/ or die;eval'print 0'.$_; |
#!/usr/bin/perl | |
$_=shift@ARGV;s/CM/+900/g;s/CD/+400/g;s/XC/+90/g;s/XL/+40/g;s/IX/+9/g;s/IV/+4/g;s/M/+1000/g;s/D/+500/g;s/C/+100/g;s/L/+50/g;s/X/+10/g;s/V/+5/g;s/I/+1/g;eval'print 0'.$_; |
<koken:load limit="10" infinite="true"> | |
<koken:loop> | |
<div style="margin:25px auto;"> | |
<koken:link lightbox="true"> | |
<koken:img lazy="true" fade="true" /> | |
</koken:link> | |
</div> |