Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
require 'active_support/inflector'
require 'benchmark'
class James
end
class John
end
class Jimmy
@nnarhinen
nnarhinen / README.md
Last active June 25, 2019 09:33
Rails-like console with express.js, bookshelf.js and node-repl-promised

Install node-repl-promised: npm install -g repl-promised

Use the repl to list all users

$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
@domkm
domkm / gist:3536189
Created August 30, 2012 18:13
Dev Bootcamp Birthday Torture
def happy_birthday(name, torture_level = 100)
hb = "Happy Birthday to You."
song = "#{hb} #{hb} Happy Birthday Dear #{name}. #{hb}"
song.chars.reduce do |memo, char|
%w[a e i o u y].include?(char) ? memo + char * torture_level : memo + char
end
end
@textarcana
textarcana / cucumber_cheatsheet.markdown
Created December 22, 2009 01:47
Cucumber cheatsheet

Cucumber cheatsheet

Best cheatsheet is: cucumber --help

Output formats

Reporting

Notification formats, in increasing order of verbosity: