Skip to content

Instantly share code, notes, and snippets.

@acammack
acammack / cidr_nested_test.erl
Last active December 13, 2015 17:59
Benchmarking CIDR lookups in ETS - nested blocks and IPv6 in parallel
%% ETS CIDR Benchmark (nested blocks, IPv4 and IPv6)
%%
%% Written in 2015 by Adam Cammack <adam@acammack.com>
%%
%% To the extent possible under law, the author have dedicated all copyright and
%% related and neighboring rights to this software to the public domain
%% worldwide. This software is distributed without any warranty.
%%
%% See <http://creativecommons.org/publicdomain/zero/1.0/>
@acammack
acammack / cidr_test.erl
Last active November 23, 2015 19:07
Benchmarking CIDR lookups in ETS
%% ETS CIDR Benchmark
%%
%% Written in 2015 by Adam Cammack <adam@acammack.com>
%%
%% To the extent possible under law, the author have dedicated all copyright and
%% related and neighboring rights to this software to the public domain
%% worldwide. This software is distributed without any warranty.
%%
%% See <http://creativecommons.org/publicdomain/zero/1.0/>
@acammack
acammack / minihub
Last active December 16, 2015 14:19
minihub: a small shell wrapper for working with github
#!/bin/sh
## Usage:
# minihub checkout|fetch|pull|push username branchname
# Fetch and checkout, fetch, pull, push, or checkout a user's branch, if you
# have access
# minihub pull-request|pr username basebranch title [message]
# Submit a pull request for the current HEAD to the user's base branch. If
# successful, it will print out the URL of the new PR.
#
@acammack
acammack / csi3334-2011-09-23.tex
Created September 25, 2011 04:49
Notes for the 2011-9-23 CSI 3334 lecture
%
% DO NOT CHANGE THIS TEMPLATE!
%
% To allow combining the lecture notes from different students in a
% simple way everybody must use the same header.
%
% If you think the template lack a package, then contact the lecturer,
% and we will probably extend the template with your favorite package.
%
@acammack
acammack / xpath.rb
Created September 20, 2011 17:33
Pulls stuff down from a page.
#!/usr/bin/env ruby
require "rubygems"
# require your gems as usual
require "nokogiri"
require 'open-uri'
doc = Nokogiri::HTML.parse open('http://cs.ecs.baylor.edu/~mia/courses/3303_201103/csi3303Review1/csi3303review1.html')
#this works to here