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
# rails 3, invalid times are set to nil | |
> m = Model.new some_timestamp: '2010-33-22T09:30:25Z' | |
=> #<Model ...> | |
> m.some_timestamp | |
=> nil | |
# rails 4, invalid times raise an exception | |
> m = Model.new some_timestamp: '2010-33-22T09:30:25Z' | |
=> ArgumentError: argument out of range |
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
class GeneratedPDF | |
def generate | |
# pdf stuff... | |
pdf_file = Tempfile.new(['something', '.pdf']) | |
pdf_file.binmode | |
pdf_file.write(pdf_string) | |
pdf_file | |
end | |
end |
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
-# This file contains the 'layout' for this section of the site | |
%section.how-it-works-page.content-section | |
.container | |
.row | |
.col-md-12 | |
%h2.section-title How It Works | |
.sub-nav.row | |
.col-sm-3 | |
= active_link_to how_we_find_kids_path, class: 'link-wrap' do | |
.img.school |
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
var LTD = {}; | |
LTD.product = (function() { | |
//private functions | |
function somethingHandy() { | |
... | |
} | |
return { | |
//public functions... |
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
# /Gemfile | |
source 'http://rubygems.org' | |
gem 'rspec' | |
gem 'capybara' | |
gem 'selenium-webdriver' | |
gem 'capybara-webkit' |
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
development: | |
adapter: postgresql | |
database: <db_name> | |
encoding: utf8 | |
username: <username> | |
password: | |
host: localhost | |
# ... |
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
watch(".*\..*") do |match| | |
puts `echo "hello"` | |
end |
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
color railscasts | |
set guifont=Monaco:h16 | |
set antialias | |
" Whitespace stuff | |
autocmd FileType javascript set tabstop=4 |
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
source 'http://rubygems.org' | |
gem 'rake' | |
gem 'rspec' | |
gem 'capybara' | |
gem 'selenium-webdriver' | |
gem 'capybara-webkit' |
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
`ps aux | awk '/spork/&&!/awk/{print $2;}'`.split("\n").map { |pid| pid.to_i } |
OlderNewer