On the iMac:
brew install --HEAD --force riak -v
On the MacBook
brew update
# get Erlang R14B03
brew install erlang
# credit: http://crshlv.ly/qkAzW0 | |
# | |
# I found this especially useful when trying | |
# to figure out equivalent apt-get packages | |
# for certain Perl CPAN modules. | |
apt-get install apt-file | |
apt-file update | |
apt-file search URI::Escape |
At Crush + Lovely, we use Railsmachine's Moonshine to automate the configuration of our servers. When writing our deployment recipes, VMWare Fusion's ability to take snapshots and rollback to these snapshots is a huge timesaver because it takes just seconds to roll a server image to it's original state.
When you're just configuring a single server, having a static IP address for your server image isn't too important, but when you're configuring multi-server setups, it can be useful to duplicate a number of server images and give each a static IP address so you can consistently deploy to them. While not documented well at all, it turns out that this is relatively easy to accomplish in four simple steps.
Let's say you have a guest machine with the name ubuntu-lucid-lynx-base
a
# credit: http://crshlv.ly/pSqu6l | |
# show all packages installed | |
dpkg --get-selections | |
# show all packages installed containing "php" | |
dpkg --get-selections | grep php | |
Three options:
ENV['DEBIAN_FRONTEND'] = "noninteractive"
.pecl install apc < answers.txt
require 'rubygems' | |
require 'yajl' | |
require 'to_google_spreadsheet' | |
json = File.new('sizes.json', 'r') # file with more than one json | |
parser = Yajl::Parser.new | |
data = parser.parse(json) | |
GoogleSpreadsheet.config do |c| | |
c.email = "[email protected]" |
# In Rails 1.2.x, the default JSON encoder doesn't quote | |
# attributes. To force quoting, set the following option | |
# to false. From the ActiveSupport::JSON docs: | |
# | |
# When +true+, Hash#to_json will omit quoting string or symbol keys | |
# if the keys are valid JavaScript identifiers. Note that this is | |
# technically improper JSON (all object keys must be quoted), so if | |
# you need strict JSON compliance, set this option to +false+. | |
# mattr_accessor :unquote_hash_key_identifiers | |
# @@unquote_hash_key_identifiers = true |
# Uninstall any pre-existing packaged | |
# versions of phpunit | |
sudo apt-get remove phpunit | |
# Install pear via apt-get | |
sudo apt-get install php-pear | |
# Update existing pear channels | |
sudo pear channel-update pear.php.net |
These instructions work best on a fresh system. While I've gotten them to work on a system where I just upgraded from Snow Leopard to Lion and had a previously working development environment (using an older version of Cinderella in my case), it was not without difficulty. It's much easier to start from scratch.
These instructions are for Mac OS X 10.7.x (Lion) only.
According to the Tiny Tower Wiki the equation for calculating how much it costs to build a given floor is:
cost = 150 × floor_number 2
A simple way to evaluate this equation in Ruby would be: