This file contains hidden or 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 'benchmark' | |
Benchmark.bm(20) do |x| | |
x.report ('<<') do | |
10_000_000.times do | |
one = 'one' | |
two = 'two' | |
three = 'three' | |
y = one << two << three | |
end |
This file contains hidden or 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
class ProjectsController < ApplicationController | |
7 | |
8 def index | |
9 @projects = nil | |
10 | |
11 if params[:studio_id] && !params[:studio_id].empty? | |
12 @projects = Project.studio(params[:studio_id]) | |
13 end | |
14 | |
15 # past, present, future |
This file contains hidden or 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
#!/bin/bash | |
# Usage: ./deploy.sh [host] | |
# e.g. sh deploy [email protected] | |
host="$1" | |
# The host key might change when we instantiate a new VM, so | |
# we remove (-R) the old host key from known_hosts | |
ssh-keygen -R "${host#*@}" 2> /dev/null |
This file contains hidden or 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
Trying to use vagrant + rubber + ubuntu 13.10 (box, probably other versions). | |
Most of the docs cover basic setup but I ran into a couple of problems not covered anywhere (does no-one use this combo before deploying to AWS?) | |
~ vagrant up | |
# OR | |
~ vagrant provision | |
-> [BUG] Segmentation fault ruby 1.9.3p194 (blah blah) | |
It seems its necessary to use rvm to switch to 1.9.3 p194 on the host |
NewerOlder