Skip to content

Instantly share code, notes, and snippets.

## Output
Node: Keys
6379: ["120"]
6380: ["119", "110", "111", "114", "105", "115", "106", "107", "118"]
6381: ["102", "112", "103", "113", "104", "100", "101"]
6382: ["116", "117", "108", "109"]
First key from each node
["119", "102", "116", "120"]
#!/usr/bin/env ruby
require "pathname"
LOADER = '''
require "pathname"
vendor_path = Pathname.new(__FILE__).parent.parent + "vendor"
Pathname.glob("#{vendor_path}/**/**/lib") do |lib|
next if $LOAD_PATH.include?(lib.realpath.to_s)
I am the owner of lvh.me. And I'm glad to hear it's helpful. In truth, it's just a fancy DNS trick. lhv.me and all of it's sub-domains just point back to your computer (127.0.0.1). That means running ssl is as simple (or difficult) as running ssl on your computer.
I'm not sure how comfortable you are with the command line, but here's my how I setup my development environment. (rvm, passenger, nginx w/ SSL, etc).
# Install rvm (no sudo!)
# ------------------------------------------------------
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
source ~/.rvm/scripts/rvm
rvm install ree-1.8.7-2010.02
levi@sosuke:~
$ rvm install 1.9.2
/Users/levi/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...
ruby-1.9.2-p136 - #fetching
ruby-1.9.2-p136 - #downloading ruby-1.9.2-p136, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8612k 100 8612k 0 0 59705 0 0:02:27 0:02:27 --:--:-- 30199
ruby-1.9.2-p136 - #extracting ruby-1.9.2-p136 to /Users/levi/.rvm/src/ruby-1.9.2-p136
@levicook
levicook / gist:995169
Created May 27, 2011 12:50
brew upgrade bs
brew upgrade
==> Downloading https://github.com/defunkt/gist/tarball/v2.0.3
File already downloaded and cached to /Users/levi/Library/Caches/Homebrew
==> rake install prefix=/usr/local/Cellar/gist/2.0.3
/usr/local/Cellar/gist/2.0.3: 3 files, 28K, built in 2 seconds
==> Downloading http://kernel.org/pub/software/scm/git/git-1.7.5.2.tar.bz2
######################################################################## 100.0%
==> make prefix=/usr/local/Cellar/git/1.7.5.2 install
==> Downloading http://kernel.org/pub/software/scm/git/git-manpages-1.7.5.2.tar.bz2
######################################################################## 100.0%
@levicook
levicook / gist:1091293
Created July 19, 2011 04:10
Cloudera Hadoop Apt Packages...
deploy@poker:~$ apt-cache search hadoop
libzookeeper-dev - Information management inside a cluster. Part of the hadoop family.
libzookeeper-java - Information management inside a cluster. Part of the hadoop family.
libzookeeper2 - Information management inside a cluster. Part of the hadoop family.
python-zookeeper - Information management inside a cluster. Part of the hadoop family.
zookeeper - Information management inside a cluster. Part of the hadoop family.
zookeeper-bin - Information management inside a cluster. Part of the hadoop family.
zookeeperd - Information management inside a cluster. Part of the hadoop family.
flume - reliable, scalable, and manageable distributed data collection application
hadoop-0.20 - A software platform for processing vast amounts of data
[alias]
ci = commit
co = checkout
df = diff -w
br = branch
me = merge
st = status
[color]
ui = auto
[user]
Reseller.demo.as_current do # So that factories are happy.
reseller = Reseller.current
# == Posture People
aaron = reseller.users.find_by_email('aaron@posturepeople.com') || reseller.users.new
aaron.display_name = 'Aaron Smith'
aaron.email = 'aaron@posturepeople.com'
aaron.password = aaron.password_confirmation = 'joinhere'
aaron.save! if aaron.changed?
[alias]
ci = commit
co = checkout
df = diff -w
br = branch
me = merge
st = status
[color]
ui = auto
[user]
#!/bin/bash --login
set -e # Exit if anything fails
pushd `dirname $0`/..
STACK=`pwd`
if ! [ -d "${STACK}/nginx/nginx-1.0.6" ]; then
pushd nginx && tar xzf 'nginx-1.0.6.tar.gz' && popd
fi