As configured in my dotfiles.
start new:
tmux
start new with session name:
| require 'yaml' | |
| require 'logger' | |
| require 'active_record' | |
| namespace :db do | |
| def create_database config | |
| options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'} | |
| create_db = lambda do |config| | |
| ActiveRecord::Base.establish_connection config.merge('database' => nil) |
| require 'active_record' | |
| ActiveRecord::Base.logger = Logger.new(STDERR) | |
| ActiveRecord::Base.colorize_logging = false | |
| ActiveRecord::Base.establish_connection( | |
| :adapter => "sqlite3", | |
| :dbfile => ":memory:" | |
| ) |
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| # Originally from http://bit.ly/GIhZmg | |
| # modified by @colour to reflect locations of assets in the asset pipeline | |
| namespace :spec do | |
| desc "Add files that DHH doesn't consider to be 'code' to stats" | |
| task :statsetup do | |
| require 'rails/code_statistics' | |
| class CodeStatistics | |
| alias calculate_statistics_orig calculate_statistics |
| #!/usr/bin/env bash | |
| uninstall() { | |
| list=`gem list --no-versions` | |
| for gem in $list; do | |
| gem uninstall $gem -aIx | |
| done | |
| gem list | |
| gem install bundler | |
| } |
| /* | |
| * I add this to html files generated with pandoc. | |
| */ | |
| html { | |
| font-size: 100%; | |
| overflow-y: scroll; | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; | |
| } |