Skip to content

Instantly share code, notes, and snippets.

View seth's full-sized avatar

Seth Falcon seth

View GitHub Profile
% connection supervisor
-module (connection_sup).
-behaviour (supervisor).
-export ([start_link/1, start_connection/0, init/1]).
start_link({Ip, Port, Options}) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [Ip, Port, Options]).
start_connection () ->
supervisor:start_child (?MODULE, []).
@seth
seth / gist:749226
Created December 20, 2010 23:35 — forked from bigloser/gist:749171
# Cookbook Name:: openldap
# Attributes:: openldap
#
# Copyright 2008-2009, Opscode, 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
@seth
seth / results
Created October 3, 2010 15:36 — forked from myronmarston/results
$ ./start_with_and_index.rb
user system total real
index fail 0.420000 0.000000 0.420000 ( 0.424444)
start_with? fail 0.990000 0.000000 0.990000 ( 0.993577)
index pass 0.420000 0.000000 0.420000 ( 0.424240)
start_with? pass 1.650000 0.020000 1.670000 ( 1.672174)