Skip to content

Instantly share code, notes, and snippets.

@giedriusr
giedriusr / chef_solo_bootstrap.sh
Created July 19, 2012 10:56
Installation of plain ruby (taken from Ryan Bates screencast) + some modifications (newer ruby patch)
#!/usr/bin/env bash
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install libyaml-dev
apt-get -y install zlib1g-dev libssl-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'
@giedriusr
giedriusr / failing_spec.rb
Last active August 29, 2015 14:15
rspec 3.0
# Documentation
# https://relishapp.com/rspec/rspec-expectations/v/3-0/docs/built-in-matchers
# expect(actual).to exist # passes if actual.exist? and/or actual.exists? are truthy
### Class
Member < ActiveRecord:Base
end
### Specs
@giedriusr
giedriusr / 0_reuse_code.js
Created July 17, 2016 17:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console