puts "Plain puts"
warn "Plain warn"
$stdout.puts "Explicit stdout puts"
$stderr.puts "Explicit stderr puts"
# Rails log level is set to INFO (although future versions of Rails will default to DEBUG in production)
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 OAuthState | |
attr_reader :request | |
def initialize(request) | |
@request = request | |
end | |
def match_and_unpack_state | |
match?.tap { unpack_state } | |
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
Africa - Abidjan | |
Africa - Accra | |
Africa - Addis Ababa | |
Africa - Algiers | |
Africa - Asmara | |
Africa - Asmera | |
Africa - Bamako | |
Africa - Bangui | |
Africa - Banjul | |
Africa - Bissau |
The following is a list of beers I recommend trying if you ever find yourself in Boulder, Colorado as I did. Places where I found these beers are indicated in brackets.
- Mountain Sun – Isadore Java Porter (Mountain)
- Mountain Sun – Jah Mon Ginger Wheat (Mountain Sun)
- Mountain Sun – Resinous Rye (Mountain Sun)
- Boulevard Brewing – 80-Acre Hoppy Wheat (Mountain Sun)
- West Flanders – Mr. Chain Blue Lighting (West Flanders)
- West Flanders – Lionheart (West Flanders)
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 TodoItem < ActiveRecord::Base | |
extend TimeState | |
# Scopes added: finished, not_finished | |
# Instance methods added: finished?, finish! | |
time_state :finished_at | |
end | |
todo_item = TodoItem.create | |
todo_item.finished_at # => nil |
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
# Usage | |
# sequence = AtomicSequence["cats"] | |
# sequence.current # => 0 | |
# sequence.next # => 1 | |
# sequence.next # => 2 | |
# sequence.current # => 2 | |
# sequence.reset! | |
# sequence.current # => 0 | |
# sequence.next # => 1 |
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
// Decoding JSON | |
// A JSON string | |
let data = ... | |
// We create an optional type which is nil to begin with. | |
var parseError: NSError? | |
// We parse the JSON, passing the nil parseError by reference. It will be set to | |
// an instance of NSError if anything goes wrong. |
I hereby claim:
- I am aupajo on github.
- I am aupajo (https://keybase.io/aupajo) on keybase.
- I have a public key whose fingerprint is 8819 C913 E4DE 44FA 6BA7 6EE8 8C16 9D73 4717 116C
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
@import "palette"; | |
body { | |
font: 20pt "Helvetica Neue", sans-serif; | |
} | |
$actions: ( | |
primary: ( | |
link: $blue, | |
hover: lighten($blue, 0.1), |