Skip to content

Instantly share code, notes, and snippets.

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <stdbool.h>
#include <v3d2.h>
@cleverca22
cleverca22 / leak.js
Created June 24, 2014 16:54
demo a leak in mongoose
var mongoose = require('mongoose');
var Schema = mongoose.Schema, ObjectId = Schema.ObjectId;
var secondLevel = new Schema({
count:Number
});
var topLevel = new Schema({
list:[secondLevel]
});
var mongoose = require('mongoose');
mongoose.Types.ObjectId.prototype.toProtobuf = function () {
return new Buffer(this.id,'binary');
}
@cleverca22
cleverca22 / output.txt
Last active August 29, 2015 14:13
conversion problem
********* Start testing of TestCase *********
Config: Using QTest library 4.8.5, Qt 4.8.5
PASS : TestCase::initTestCase()
QDEBUG : TestCase::convert(201) 201
QDEBUG : TestCase::convert(201.6) 201.6
PASS : TestCase::convert()
PASS : TestCase::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of TestCase *********
{ lib, config, pkgs, ... }:
{
services = {
toxvpn.enable = true;
toxvpn.localip = "192.168.123.10";
};
imports = [ <nixpkgs/nixos/modules/profiles/all-hardware.nix> "/etc/nixos/toxvpn_module.nix" ];
}
{ lib, config, pkgs, ... }:
{
nixpkgs.config = {
packageOverrides = pkgs: rec {
pixman = pkgs.stdenv.lib.overrideDerivation pkgs.pixman (oldAttrs: {
# bypass a gcc 4.9 bug
configureFlags = "--disable-arm-iwmmxt";
});
};
};

Keybase proof

I hereby claim:

  • I am cleverca22 on github.
  • I am clever (https://keybase.io/clever) on keybase.
  • I have a public key whose fingerprint is 96A5 5719 A1EB 956F 3EF9 CF22 C294 FC1A 485A 409A

To claim this, I am signing this object:

source $stdenv/setup
echo $out
ar x $src
ls
mkdir -pv unpacked
cd unpacked
tar -xf ../data.tar.xz
for x in opt/google/chrome/chrome; do
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath $libPath $x
var net = require('net');
var crypto = require('crypto');
var MongoClient = require('mongodb').MongoClient;
var ObjectID = require('mongodb').ObjectID
var connid = 0;
var peers;
function Connection(ip,port,keep) {
this.nick = ip+'#'+connid++;
{ system ? builtins.currentSystem }:
let
configuration = { config, pkgs, ...}: {
imports = [
<nixos/modules/virtualisation/qemu-vm.nix>
./configuration.nix
];
config = {
virtualisation = {