An event source
will always have the following properties:
{
"name": "Event source",
"type": "static"
}
Like autotune for your objects.
class Autochain
attr_reader :subject
def initialize(subject)
@subject = subject
end
class JSPTagParser < Parslet::Parser | |
rule(:java) { (str('%>').absent? >> any).repeat.as(:java) } | |
rule(:jsp) { java.as(:code) } | |
rule(:jsp_with_tags) { str('<%') >> jsp >> str('%>') } | |
rule(:text) { (str('<%').absent? >> any).repeat(1) } | |
rule(:text_with_java) { (text.as(:text) | jsp_with_tags).repeat.as(:text) } | |
root(:text_with_java) | |
end |
#!/bin/bash | |
if [ `defaults read com.apple.finder AppleShowAllFiles` == 1 ] | |
then | |
echo "Hiding hidden files." | |
defaults write com.apple.finder AppleShowAllFiles -bool false | |
else | |
echo "Showing hidden files." | |
defaults write com.apple.finder AppleShowAllFiles -bool true | |
fi |
@import "palette"; | |
body { | |
font: 20pt "Helvetica Neue", sans-serif; | |
} | |
$actions: ( | |
primary: ( | |
link: $blue, | |
hover: lighten($blue, 0.1), |
I hereby claim:
To claim this, I am signing this object:
// 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. |
# Usage | |
# sequence = AtomicSequence["cats"] | |
# sequence.current # => 0 | |
# sequence.next # => 1 | |
# sequence.next # => 2 | |
# sequence.current # => 2 | |
# sequence.reset! | |
# sequence.current # => 0 | |
# sequence.next # => 1 |
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 |
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.