I hereby claim:
- I am akahn on github.
- I am alexanderkahn (https://keybase.io/alexanderkahn) on keybase.
- I have a public key ASBLDLib9bYbOsUnLI147LkETyqe7sHAzucsBN6jmjinLgo
To claim this, I am signing this object:
package main | |
import ( | |
"io" | |
"log" | |
"net/http" | |
"time" | |
) | |
func main() { |
package main | |
import ( | |
"encoding/binary" | |
"encoding/hex" | |
"log" | |
"runtime" | |
"sync" | |
"sync/atomic" | |
"time" |
I hereby claim:
To claim this, I am signing this object:
Jump forward/back one word | |
alt-b/alt-f | |
Go to beginning/end of line | |
^a/^e | |
Delete to beginning of command | |
^u | |
Navigate through history of commands (this works in many places in OS X) |
require 'strscan' | |
require 'pry' | |
class Sheet | |
def initialize(x, y, initial = 0) | |
@matrix = Array.new(y) { (Array.new(x) { initial }) } | |
end | |
def to_s | |
s = '' |
May 31 14:30:00 l2met-prod-38 l2met-log: 2016/05/31 18:30:00 receiver.go:540: LOGGED_METRIC_IN: [[email protected]] name=dubsmash.password_recovery.send_mail_returns_1 source=dubsmash vals=[1] | |
May 31 14:30:01 l2met-prod-32 l2met-log: 2016/05/31 18:30:01 receiver.go:540: LOGGED_METRIC_IN: [[email protected]] name=dubsmash.password_recovery.send_mail_returns_1 source=dubsmash vals=[1] | |
May 31 14:30:02 l2met-prod-35 l2met-log: 2016/05/31 18:30:01 receiver.go:540: LOGGED_METRIC_IN: [[email protected]] name=dubsmash.password_recovery.send_mail_returns_1 source=dubsmash vals=[1] | |
May 31 14:30:02 l2met-prod-39 l2met-log: 2016/05/31 18:30:02 receiver.go:540: LOGGED_METRIC_IN: [[email protected]] name=dubsmash.password_recovery.send_mail_returns_1 source=dubsmash vals=[1] | |
May 31 14:30:03 l2met-prod-33 l2met-log: 2016/05/31 18:30:03 receiver.go:540: LOGGED_METRIC_IN: [[email protected]] name=dubsmash.password_recovery.send_mail_returns_1 source=dubsmash vals=[1] | |
May 31 14:30:05 l2met-prod-33 l2met-log: 20 |
[Producer.new(pool, notifications_east, Notifier).thread, | |
Producer.new(pool, notifications_west, Annotator).thread, | |
Producer.new(pool, annotations_east, Annotator).thread, | |
Producer.new(pool, annotations_west, Annotator).thread].each &:join |
input = "()(((()))(()()()((((()(((())(()(()((((((()(()(((())))((()(((()))((())(()((()()()()(((())(((((((())))()()(()(()(())(((((()()()((())(((((()()))))()(())(((())(())((((((())())))(()())))()))))()())()())((()()((()()()()(()((((((((()()())((()()(((((()(((())((())(()))()((((()((((((((())()((()())(())((()))())((((()())(((((((((((()()(((((()(()))())(((()(()))())((()(()())())())(()(((())(())())()()(()(()((()))((()))))((((()(((()))))((((()(()(()())())()(((()((((())((((()(((()()(())()()()())((()((((((()((()()))()((()))()(()()((())))(((()(((()))((()((()(()))(((()()(()(()()()))))()()(((()(((())())))))((()(((())()(()(())((()())))((((())))(()(()(()())()((()())))(((()((()(())()()((()((())(()()((())(())()))()))((()(())()))())(((((((()(()()(()(())())))))))(()((((((())((((())((())())(()()))))()(())(()())()())((())(()))))(()))(()((()))()(()((((((()()()()((((((((()(()(())((()()(()()))(())()())()((())))()))()())(((()))(())()(())()))()((()((()(()()())(())()()()((())())))((()()(()()((()(())()()())(((()(()()))))(())))(()(()())( |
require 'thread' | |
t = Thread.current | |
Thread.new do | |
puts 'starting server, takes a few seconds' | |
# return control to main thread | |
t.wakeup | |
end |
# Validations added in an instance hook: | |
model.after_validation_hook { model.errors.add("random_attribute", 'Unrecognized attribute') } | |
# Later: | |
> model.valid? | |
=> false | |
> model.errors | |
=> {"random_attribute"=>["Unrecognized attribute"]} |