Skip to content

Instantly share code, notes, and snippets.

@mdub
mdub / valid.rb
Created Oct 11, 2012 — forked from adzap/valid.rb
Testing fail?
View valid.rb
# I have a class that delegates functionality to a couple of objects that it
# constructs. I want to test this in isolation. I want to make sure that the
# objects are constructed with the right arguments. I also want to make sure
# that the results from the objects are handled correctly.
#
# I'm finding it hard to structure the code and test in a way that isn't
# cumbersome. What's below works, but it feels like a lot of stubbing and setup
# for something the should be simpler.
#
# Anyone got a better approach for this?
@mdub
mdub / 0-readme.md
Created Feb 28, 2012 — forked from albertoperdomo/0-readme.md
ruby-1.9.3-p125 cumulative performance patch.
View 0-readme.md

Patched ruby 1.9.3-p125 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

View gist:289701
sudo cp /usr/local/Cellar/mysql/5.1.41/com.mysql.mysqld.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist
sudo cp /usr/local/Cellar/postgresql/8.4.2/org.postgresql.postgres.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/org.postgresql.postgres.plist
sudo cp /usr/local/Cellar/mongodb/1.2.0-x86_64/org.mongodb.mongod.plist /Library/LaunchDaemons/
sudo launchctl load -w /Library/LaunchDaemons/org.mongodb.mongod.plist