- Model1 explicitly belongs_to_one Model2 (via the
model2
attribute) - Model2 implicitly has_one Model1
This file contains 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
# coding: utf-8 | |
require 'rubygems' | |
require 'hpricot' | |
require 'fileutils' | |
require 'yaml' | |
require 'time' | |
module Jekyll | |
# This importer takes a wordpress.xml file, which can be exported from your |
This file contains 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
#!/usr/bin/env ruby | |
require 'optparse' | |
options = {} | |
# parse commandline options | |
OptionParser.new do |opts| | |
opts.banner = "Usage: #{__FILE__} [-lmw] [file]" |
This file contains 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
Operating system: Mac OS X | |
10.8.2 12C60 | |
CPU: x86 | |
GenuineIntel family 6 model 37 stepping 5 | |
4 CPUs | |
Crash reason: EXC_BAD_ACCESS / KERN_PROTECTION_FAILURE | |
Crash address: 0x58 | |
Thread 0 (crashed) |
This file contains 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
Operating system: Linux | |
0.0.0 Linux 2.6.32-350-ec2 #57-Ubuntu SMP Thu Nov 15 15:59:03 UTC 2012 x86_64 | |
CPU: amd64 | |
family 6 model 26 stepping 5 | |
2 CPUs | |
Crash reason: SIGSEGV | |
Crash address: 0x0 | |
Thread 0 (crashed) |
This file contains 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
after 'deploy:stop', 'puma:stop' | |
after 'deploy:start', 'puma:start' | |
after 'deploy:restart', 'puma:restart' | |
_cset(:puma_cmd) { "#{fetch(:bundle_cmd, 'bundle')} exec puma" } | |
_cset(:pumactl_cmd) { "#{fetch(:bundle_cmd, 'bundle')} exec pumactl" } | |
_cset(:puma_state) { "#{shared_path}/sockets/puma.state" } | |
_cset(:puma_role) { :app } | |
namespace :puma do |
This file contains 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
# encoding: utf-8 | |
require 'guard/guard' | |
module ::Guard | |
class Thesis < ::Guard::Guard | |
def run_all | |
end | |
def run_on_changes(paths) |
This file contains 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
# Instead of globally disabling ignoring hidden elements like this | |
Capybara.configure do |config| | |
config.ignore_hidden_elements = false | |
end | |
# You can choose to selectively disable it on a per-call basis | |
Capybara.select 'Foo', :from => 'Bar Selection', :visible => :all | |
Capybara.find :css, 'select#my_id', :visible => :all |
I hereby claim:
- I am pfleidi on github.
- I am pfleidi (https://keybase.io/pfleidi) on keybase.
- I have a public key whose fingerprint is 0187 FDE8 A967 B739 EE2B B857 48CB 26A0 5711 CE93
To claim this, I am signing this object:
This file contains 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/sh | |
FILE_PATH="$(ls ~/.lolcommits/${PWD##*/}/$(git rev-parse HEAD | cut -c1-11).*)" | |
if [ "$?" -ne "0" ] || [ ! -f $FILE_PATH ]; then | |
lolcommits --capture --animate=1 --delay=4 | |
fi | |
FILE_PATH="$(ls ~/.lolcommits/${PWD##*/}/$(git rev-parse HEAD | cut -c1-11).*)" | |
GITHUB_REPO="$(git remote -v | grep origin | head -1 | sed 's/.*git@github\.com:\(.*\/.*\)\.git.*/\1/')" |