Skip to content

Instantly share code, notes, and snippets.

@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@chetan
chetan / yardoc_cheatsheet.md
Last active May 4, 2024 11:12
YARD cheatsheet
@iron9light
iron9light / finalize.js
Created February 10, 2012 06:43
Get random records form mongodb via map/reduce
function(k, v) {
return v.a ? v.a.map(function(x) {
return x.k
}) : [v.k]
}
@scottjbarr
scottjbarr / install_memcached.sh
Created December 14, 2009 07:26
Install memcached and libevent from source on Debian Etch or Lenny
#!/bin/bash
#
# Download and install libevent and memcached from source on Debian Etch or
# Debian Lenny.
#
# Assumptions
# - libevent and memcached have not been installed from apt repositories
# - memcached is not already running
# - it is ok to clobber scripts at
# /etc/memcached.conf