Skip to content

Instantly share code, notes, and snippets.

View justincampbell's full-sized avatar
🌯
🍩

Justin Campbell justincampbell

🌯
🍩
View GitHub Profile
@justincampbell
justincampbell / scrc-day1.md
Created August 3, 2012 21:49
Steel City Ruby Conf 2012

Getting the most out if a Conference - Jeff Casimir

Why are we here? Ruby community is awesome New people are awesome Developers are exhausted by social interaction Recharge with a movie by yourself Conferences are about starting conversation Its hard Introvert != shy

@justincampbell
justincampbell / update-ami.sh
Created October 4, 2012 15:24
Update AMI/LC for AS group
#!/bin/bash
if [ ! -n "$1" ]
then
echo "Usage: ./update-ami.sh INSTANCE_ID"
exit 65
fi
INSTANCE_ID=$1
REVISION_ID=`git rev-parse --short HEAD`
Bundle 'mattn/gist-vim'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-rails'
Bundle 'vim-ruby/vim-ruby'
Helptags
~/Code/celluloid/examples$ rbenv shell rbx-1.2.4
~/Code/celluloid/examples$ gem install celluloid
ERROR: Error installing celluloid:
celluloid requires Ruby version >= 1.9.2.
1 ~/Code/celluloid/examples$ rbenv shell rbx-2.0.0-dev
~/Code/celluloid/examples$ gem install celluloid
ERROR: Error installing celluloid:
celluloid requires Ruby version >= 1.9.2.
1 ~/Code/celluloid/examples$ rbenv shell jruby-1.7.0
~/Code/celluloid/examples$ gem install celluloid
@justincampbell
justincampbell / output.log
Created November 10, 2012 18:16
RSpec mocks with should raise_error
F.
Failures:
1) MyClass this should fail
Failure/Error: -> { my_class.one }.should raise_error ZeroDivisionError
expected ZeroDivisionError, got #<RSpec::Mocks::MockExpectationError: (#<MyClass:0x007fc49c8f96d0>).two(no args)
expected: 0 times
received: 1 time>
# ./should_raise_error_spec.rb:16:in `block (2 levels) in <top (required)>'
$APP_VERSION = '1.2'
Motion::Project::App.setup do |app|
app.short_version = $APP_VERSION
app.version = $APP_VERSION
require 'celluloid'
class ServiceA
include Celluloid
end
class ServiceB
include Celluloid
end
context 'using values from the Berksfile config' do
before do
::Berkshelf::Config.instance.cookbook.stub(copyright: 'Seth Vargo')
load 'lib/berkshelf/cookbook_generator.rb'
capture(:stdout) {
described_class.new([target, name]).invoke_all
}
end
require "prawn"
require "prawn/measurement_extensions"
def new_page
start_new_page
fill_color '111111'
canvas do
fill_rectangle [bounds.left, bounds.top], bounds.width, bounds.height
@justincampbell
justincampbell / Vagrantfile
Last active December 13, 2015 19:18
Vagrant commands
Vagrant::Config.run do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.provision :shell, inline: <<-SHELL
echo "alias whatshere=ls" >> /etc/bash.bashrc
SHELL
end