Skip to content

Instantly share code, notes, and snippets.

@senny
senny / 01_pg_guide_examples.md
Last active August 29, 2015 13:56
Active Record PostgreSQL guide examples.

Active Record PostgreSQL Examples

These are the examples used in the Active Record PostgreSQL guide. They are executable and verifiable.

@neerajsingh0101
neerajsingh0101 / with_published_versions.rb
Last active December 15, 2015 02:28
How to write Active Record bug report when you are using published versions of gems. More details at https://gist.github.com/neerajdotname/5187216 .
gem 'activerecord', '3.2.12'
require 'active_record'
require "minitest/autorun"
require 'minitest/pride'
require 'logger'
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define do
@yetanothernguyen
yetanothernguyen / mountain-lion-brew-setup.markdown
Created July 26, 2012 09:06 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

When /^(.*) in the "([^\"]*)" section$/ do |action, title|
within "//*[(h1|h2|h3|h4|h5|h6|legend|caption)/descendant-or-self::*[contains(text(), '#{title}')]]" do
When action
end
end
When /^(.*) in the "([^\"]*)" row$/ do |action, title|
within "//*[(th|td)/descendant-or-self::*[contains(text(), '#{title}')]]" do
When action
end