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 VeryVeryBadException < RuntimeError | |
end | |
begin | |
raise VeryVeryBadException, "winter is coming" |
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
# Quiz Exercise, Part One | |
# | |
# Quiz for a list of names & birthdays, | |
# then list out their ages | |
# | |
# For example: | |
# | |
# Hey there! Please enter a list of names: | |
# > John, Sam, Bob, Alisha, Henry | |
# |
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
@mixin blur($much: 10px) { | |
-webkit-filter: blur($much); | |
// Force hardware acceleration for vastly improved performance | |
-webkit-transform: translate3d(0, 0, 0); | |
} |
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
bundler: bundle exec guard --plugin bundler --no-interactions | |
db: postgres -D /opt/boxen/homebrew/var/postgres | |
integration: bundle exec guard --plugin cucumber --no-interactions | |
mailcatcher: mailcatcher --foreground --verbose | |
redis: redis-server /opt/boxen/homebrew/etc/redis.conf | |
test: bundle exec guard --plugin rspec --no-interactions | |
web: bundle exec guard --plugin unicorn --no-interactions | |
worker: bundle exec sidekiq |
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 ActiveRecord::Reflection::AssociationReflection | |
class AmbiguousAssociationClassError < Exception | |
def initialize results | |
super "Could not guess association, please specify using class_name. Likely options: #{results.join(', ')}" | |
end | |
end | |
def klass | |
super | |
rescue NameError |
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 is used by Rack-based servers to start the application. | |
$stdout.sync = true | |
require 'unicorn/worker_killer' | |
## | |
## Maximum Requests | |
## |
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/bash | |
set -e | |
printf '\npost-checkout hook\n\n' | |
if [[ $3 == 1 ]]; then | |
echo "Creating `git name-rev --name-only $2`" | |
createdb "ticketbud_`git name-rev --name-only $2`_development" |
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 Person < ActiveRecord::Base | |
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
// multi-ticket icon | |
.fa-tickets { | |
&:after, &:before { | |
content: "\f145"; | |
} | |
&:after { | |
margin-left: -12px; | |
opacity: 0.7; | |
} |
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 StandardError | |
# Accountant::CannotDestroyFinancialData = Class.new(Exception) | |
# before_destroy(&Accountant::CannotDestroyFinancialData) | |
def self.to_proc | |
e = self; -> { raise e } | |
end | |
end |