Skip to content

Instantly share code, notes, and snippets.

View mhat's full-sized avatar

Matt Windbrook mhat

  • San Francisco, CA
View GitHub Profile

step 1: edit the redis formula

brew edit redis 

then change

url 'http://redis.googlecode.com/files/redis-2.0.0-rc4.tar.gz'
sha1 'b2fda3b2a073c537c324b962ba0c7c81be8baef3'
@mhat
mhat / a-guide.markdown
Created August 15, 2010 23:11
rolling with homebrew

Rolling with HomeBrew (rather than MacPorts)

First things first, we have to install HomeBrew. Once installed we can do pretty much everything else via HomeBrew. By default HomeBrew will install to /usr/local. It's possible to choose a different directory but everything I've read so far says it's a PITA. I'm sticking with the default.

ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"

Getting your development environment running requires a few servers. You could get by with as little as Postgres and Memcached but it'll be better if you have Nginx and RabbitMQ as well. Eventually you'll probably want Redis and Artie as well.

TODO: instructions for Redis and Artie

Matt@Endless-Waltz$ ./script/console
Loading development environment (Rails 2.3.2)
/Users/Matt/Hacking/workfeed/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:99:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
>> require 'cassandra'
NameError: uninitialized constant Connection::Base
from /Users/Matt/Hacking/workfeed/vendor/rails/activesupport/lib/active_support/dependencies.rb:440:in `load_missing_constant'
from /Users/Matt/Hacking/workfeed/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/thrift_client-0.4.0/lib/thrift_client/connection/socket.rb:2
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
require 'benchmark'
puts `uname -a`
puts `ruby --version`
puts '-' * 78
@small = (0 .. 10).to_a
@exps = []
GC.enable_stats
Darwin Endless-Waltz.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0], MBARI 0x6770, Ruby Enterprise Edition 2009.10
------------------------------------------------------------------------------
--
map with block vs &: -- iterations by powers of 10
##############################################################################
user system total real
## 10^0
simply-S 0.000000 0.000000 0.000000 ( 0.000022)
times gc'ed: 0