Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc
set :sync_directories, ["public/assets", "public/galleries"] | |
set :sync_backups, 3 |
# install git | |
sudo apt-get install g++ curl libssl-dev apache2-utils | |
sudo apt-get install git-core | |
# download the Node source, compile and install it | |
git clone https://github.com/joyent/node.git | |
cd node | |
./configure | |
make | |
sudo make install | |
# install the Node package manager for later use |
Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
set :sync_directories, ["public/assets", "public/galleries"] | |
set :sync_backups, 3 |
source :rubygems | |
gem 'sinatra' | |
gem 'httparty' | |
gem 'nokogiri' |
# etc ... | |
group :development do | |
# etc ... | |
# Sprites: | |
gem 'sprite-factory' | |
gem 'rmagick' | |
gem 'piet' # image optimization | |
end |
BEGIN; | |
LOCK table_name; | |
ALTER TABLE table_name ADD COLUMN column_new column_type; | |
UPDATE table_name SET column_new = column_name; | |
ALTER TABLE table_name DROP column_name; | |
ALTER TABLE table_name RENAME column_new TO column_name; | |
END; | |
-- varchar -> integer | |
-- UPDATE cpvbeacon_dev SET column_new = CAST (nullif(column_name, '') AS INTEGER); |