Skip to content

Instantly share code, notes, and snippets.

View a-bash's full-sized avatar

Andy Bashelor a-bash

View GitHub Profile
@a-bash
a-bash / rails31init.md
Created September 19, 2011 18:38 — forked from jraines/rails31init.md
Rails 3.1 with Rspec, Cucumber, Factory Girl, Haml, and Simple Form

Install Rails 3.1 RC

gem install rails --pre

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

@a-bash
a-bash / heroku_migrate_from_bamboo_to_cedar.rake
Created January 26, 2012 21:58 — forked from rafaelp/heroku_migrate_from_bamboo_to_cedar.rake
Rake task to migrate an application from bamboo stack do cedar stack on Heroku
# -*- encoding : utf-8 -*-
# Rafael Lima (http://rafael.adm.br)
# License: http://creativecommons.org/licenses/by/2.5/
#
# ATTENTION: This is a initial work, use it at your own risk!
#
# Usage:
# $ APP_NAME=myappname rake heroku:migrate_from_bamboo_to_cedar
@a-bash
a-bash / start_on_project.scpt
Created April 6, 2012 15:56 — forked from oliverbarnes/start_on_project.scpt
Automating iterm 2 sessions for a rails 3 project using applescript
-- open terminal sessions
tell application "iTerm 2"
activate
set myterm to (make new terminal)
tell myterm
-- start mongo
launch session "Default"
@a-bash
a-bash / wait_until.rb
Created April 18, 2012 21:17 — forked from metaskills/wait_until.rb
Never sleep() using Capybara!
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path
click_link 'My HomeMarks'
within '#login_area' do
fill_in 'email', with: '[email protected]'
fill_in 'password', with: 'test'
class Fixnum
def seconds
self
end
def minutes
self * 60
end
def hours
# Apt-install various things necessary for Ruby, guest additions,
# etc., and remove optional things to trim down the machine.
apt-get -y update
apt-get -y remove apparmor
apt-get -y install linux-headers-$(uname -r) build-essential
apt-get -y install zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev libssl-dev openssl libreadline5-dev
apt-get clean
# Remove this file to avoid dhclient issues with networking
rm -f /etc/udev/rules.d/70-persistent-net.rules