Skip to content

Instantly share code, notes, and snippets.

View nicolasmeunier's full-sized avatar

Nicolas Meunier nicolasmeunier

View GitHub Profile
@nicolasmeunier
nicolasmeunier / benchmark
Created November 16, 2013 00:05
Benchmarking of levenshtein trie fuzzy search
require 'yaml'
require 'benchmark'
def random_word
(0..rand(30)).map { ('a'..'z').to_a[rand(26)] }.join
end
array = (1..50000).map { random_word }
dictionary = LevenshteinTree.from_array(array)
@nicolasmeunier
nicolasmeunier / bootstrap.sh
Created October 8, 2011 23:20 — forked from knzconnor/bootstrap.sh
An example bash bootstrap to get workstation set-up with chef - update YOUR_ORG below
#!/usr/bin/env sh
#After forking and editing YOUR_ORG to point at the right repo can be run via:
#bash <(curl -s https://raw.github.com/gist/THEIDOFYOURFORKEDGIST)
#if you use `curl xxx | sh` input will be messed up and there will be no pauses
#I keep XCode and gcc on a thumbdrive along with java, for speeding things up
#http://support.apple.com/downloads/DL1421/en_US/JavaForMacOSX10.7.dmg
read -p "Install XCode or gcc (http://github.com/kennethreitz/osx-gcc-installer)"
#setup your ssh keys for github