Skip to content

Instantly share code, notes, and snippets.

View argv0's full-sized avatar

Andy Gross argv0

View GitHub Profile
#!erts-5.8.5/bin/escript
-module(bitcask_merge).
-compile(export_all).
main(_) ->
Dirs = [filename:join(["data", "bitcask", F]) ||
F <- element(2, file:list_dir("data/bitcask"))],
io:format("~p~n", [merge_dir(Dirs, [])]).
merge_dir([], Acc) ->
Date: Fri, 07 Aug 2009 12:21:46 +0000
Subject: ripple-0.17: gonna GO GO GO
From: [email protected]
To: [email protected], [email protected], [email protected], [email protected],
[email protected], [email protected], [email protected],
[email protected], [email protected], [email protected]
details: https://beachhead.bashotechnologies.net/hg/ripple-0.17/?cs=a3583b5f7859
Subject: sunspot: skeleton for sunspot
From: [email protected]
To: [email protected], [email protected], [email protected], [email protected],
[email protected]
Date: Mon, 04 Feb 2008 21:32:51 +0000
details: https://beachhead.bashotechnologies.net/hg/sunspot/?cs=a2bf4a906add
changeset: 0:a2bf4a906add
user: [email protected]
date: Mon Feb 04 16:32:28 2008 -0500
#!/usr/bin/env python
# coding: utf-8
from SocketServer import BaseRequestHandler, ThreadingUDPServer
from cStringIO import StringIO
import os
import socket
import struct
import time
'''
#include <fcntl.h>
#include <unistd.h>
#include <vector>
uint64_t *polynomial_lookup_buf;
struct rab_poly
{
rab_poly()
: start(0), length(0), value(0) {}
@argv0
argv0 / wtf.cpp
Created September 22, 2011 19:35
int main()
{
char x('a');
char y(reinterpret_cast<char>(x));
}
// mitya:~ andy$ g++ wtf.cpp
// wtf.cpp: In function ‘int main()’:
// wtf.cpp:5: error: invalid cast from type ‘char’ to type ‘char’
/*
Copyright 2011 Basho Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
template <typename T, std::size_t SIZE=256>
class auto_buffer
{
public:
typedef T value_type;
typedef std::size_t size_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
@argv0
argv0 / gist:1005588
Created June 2, 2011 23:44
compile time typelists and foldl metafunction
#include <stdio.h>
#include <typeinfo>
struct null_ {
typedef null_ type;
};
/* an empty type to mark the empty list */
struct null_list_ {
typedef null_list_ type;
@argv0
argv0 / gist:1005466
Created June 2, 2011 22:23
compile time typelists and fold metafunction
#include <stdio.h>
/* an empty type to mark the empty list */
struct null_typelist {};
/* list representation */
template <class H, class T>
struct typelist {
typedef typelist<H, T> type;