Skip to content

Instantly share code, notes, and snippets.

Nico Kaiser nicokaiser

Block or report user

Report or block nicokaiser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
#!/usr/bin/env python3
from __future__ import print_function
from datetime import datetime
import os
import sys
import time
import tempfile
import shutil
View events.js
function EventEmitter() {
this._events = {};
this._maxListeners = this._maxListeners || undefined;
module.exports = EventEmitter;
EventEmitter.prototype.emit = function(type) {
if (!this._events[type]) return false;
View etc-nginx-conf.d-ssl.conf
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 24h;

Keybase proof

I hereby claim:

  • I am nicokaiser on github.
  • I am 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:

View client.html
<!DOCTYPE html>
<script src="">
// WAMP session object
var sess;
var wsuri = "ws://localhost:9000";
View contents.lens
<koken:load limit="10" infinite="true">
<div style="margin:25px auto;">
<koken:link lightbox="true">
<koken:img lazy="true" fade="true" />
nicokaiser /
Created Oct 24, 2012
Conversion from Roman to Arabic numerals
$_=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'.$_;
nicokaiser /
Created Oct 24, 2012
Conversion from Roman to Arabic numerals
$_=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'.$_;
nicokaiser / server.js
Created Apr 12, 2012
node http request leak
View server.js
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') })
View obj-gc-test-fail.js
// 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' }
You can’t perform that action at this time.