Skip to content

Instantly share code, notes, and snippets.

View DistRedis#mget.out.txt
## 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"]
View mooch.rb
#!/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)
View ssl on lvh.me
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
View goliath.install.log
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
brew upgrade bs
View gist:995169
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 Jul 19, 2011
Cloudera Hadoop Apt Packages...
View gist:1091293
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
View gist:1179572
[alias]
ci = commit
co = checkout
df = diff -w
br = branch
me = merge
st = status
[color]
ui = auto
[user]
View gist:1181270
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?
View gist:1207836
[alias]
ci = commit
co = checkout
df = diff -w
br = branch
me = merge
st = status
[color]
ui = auto
[user]
View gist:1226880
#!/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