Skip to content

Instantly share code, notes, and snippets.

View SDL_v3d2.c
#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 Jun 24, 2014
demo a leak in mongoose
View leak.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema, ObjectId = Schema.ObjectId;
var secondLevel = new Schema({
count:Number
});
var topLevel = new Schema({
list:[secondLevel]
});
View gist:c4673cb45b827190dee9
var mongoose = require('mongoose');
mongoose.Types.ObjectId.prototype.toProtobuf = function () {
return new Buffer(this.id,'binary');
}
@cleverca22
cleverca22 / output.txt
Last active Aug 29, 2015
conversion problem
View output.txt
********* 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 *********
View configuration.nix
{ 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" ];
}
View configuration.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";
});
};
};
View keybase.md

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:

View builder.sh
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
View gist:2f981afe7f5a20167b50
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++;
View lan1-default.nix
{ system ? builtins.currentSystem }:
let
configuration = { config, pkgs, ...}: {
imports = [
<nixos/modules/virtualisation/qemu-vm.nix>
./configuration.nix
];
config = {
virtualisation = {
You can’t perform that action at this time.