Skip to content

Instantly share code, notes, and snippets.

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@bobanj
bobanj / ab_localhost_ruby
Created January 29, 2011 17:49
Apache Benchmark on my blog app, ruby 1.9.2 and ruby 1.8.7 ree
command: ab -n 500 -c 5 http://localhost:3000/
# Results with - Ruby 1.9.2
Server Software: nginx/0.8.53
Server Hostname: localhost
Server Port: 3000
Document Path: /
#! /usr/local/bin/ruby -w
# This simple program takes a bunch of images and creates a sprite image along with the corrosponding
# css. It also generates the datauri css. So, we can serve performance optimized CSS depending on the
# Browsers.
#
# Browsers which do not support datauri, like IE7 and below get the sprite image and the sprite css.
# Browsers which support datauri, get the datauri.css
#
# Usage:
# part of config/enviroment.rb
...
Rails::Initializer.run do |config|
# Load model files from sub folders
config.load_paths += Dir["#{RAILS_ROOT}/app/models/*"].find_all { |f| File.stat(f).directory? }
# Load middleware - initially used by flash-session-hack
config.load_paths << "#{RAILS_ROOT}/app/middleware"