This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# extracted from marty andrew's presentation on ruby static code analysis | |
# http://www.slideshare.net/martin_j_andrews/code-quality-analysis | |
require 'flog' | |
require 'flay' | |
require 'roodi' | |
require 'roodi_task' | |
require 'metric_fu' | |
desc "Analyze for code complexity" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Point *.example.com in your DNS setup to your server. | |
# | |
# 2) Setup an Apache vhost to catch the star pointer: | |
# | |
# <VirtualHost *:80> | |
# ServerName example.com | |
# ServerAlias *.example.com | |
# </VirtualHost> | |
# | |
# 3) Set the current account from the subdomain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery ie6ize: Emulate IE-6 rendering - 11/13/2009 | |
* http://mankzblog.wordpress.com/2009/11/13/ie6-frame-to-battle-chrome-frame/ | |
* | |
* Created by Mats Bryntse | |
* | |
* Plugin-ified by "Cowboy" Ben Alman | |
* http://benalman.com/ | |
* | |
* Bookmarklet version: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: exit statuses | |
In order to specify expected exit statuses | |
As a developer using Cucumber | |
I want to use the "the exit status should be" step | |
Scenario: exit status of 0 | |
When I run "ruby -h" | |
Then the exit status should be 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you'd obviously have more settings somewhere | |
set :repository, "git@github.com:defunkt/github.git" | |
set :branch, "origin/master" | |
namespace :deploy do | |
desc "Deploy the MFer" | |
task :default do | |
update | |
restart | |
cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RAILS_ROOT ||= ENV["RAILS_ROOT"] | |
namespace :bundle do | |
task :all => [ :js, :gist_js, :css ] | |
task :js do | |
require 'lib/js_minimizer' | |
paths = [] | |
paths += Dir[RAILS_ROOT + '/public/javascripts/jquery.*.js'].sort | |
paths += Dir[RAILS_ROOT + '/public/javascripts/github.*.js'].sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://unicorn.bogomips.org/SIGNALS.html | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
rails_root = ENV['RAILS_ROOT'] || "/data/github/current" | |
God.watch do |w| | |
w.name = "unicorn" | |
w.interval = 30.seconds # default | |
# unicorn needs to be run from the rails root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://unicorn.bogomips.org/SIGNALS.html | |
namespace :unicorn do | |
task :start, :roles => :app do | |
sudo "god start unicorn" | |
end | |
task :stop, :roles => :app do | |
sudo "god stop unicorn" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionView::Base.field_error_proc = Proc.new { |html_tag, instance| %[<span class="fieldWithError">#{html_tag}</span>] } |
OlderNewer