I hereby claim:
- I am kerryb on github.
- I am kerryb (https://keybase.io/kerryb) on keybase.
- I have a public key whose fingerprint is 8DA4 4B51 5A90 D3AE 07B9 2FD2 5E07 C65F E855 9D1D
To claim this, I am signing this object:
| Erlang R15B (erts-5.9) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] | |
| Eshell V5.9 (abort with ^G) | |
| 1> c(doubler). | |
| {ok,doubler} | |
| 2> c(monitor). | |
| {ok,monitor} | |
| 3> | |
| 3> monitor:start(). | |
| new |
| # A proc is just a block of code that can be called later: | |
| say_hello = -> { 2 + 2 } | |
| say_hello.call # => 4 | |
| # Procs can take parameters: | |
| double = ->(x) { x * 2 } |
| [color] | |
| diff = auto | |
| status = auto | |
| branch = auto | |
| [instaweb] | |
| browser = open | |
| [merge] | |
| keepBackup = false | |
| tool = diffmerge | |
| defaultToUpstream = true |
| # config/application.rb | |
| require File.expand_path('../boot', __FILE__) | |
| # Pick the frameworks you want: | |
| require "active_model/railtie" | |
| # require "active_record/railtie" | |
| require "action_controller/railtie" | |
| require "action_mailer/railtie" | |
| require "action_view/railtie" |
I hereby claim:
To claim this, I am signing this object:
| Verifying that +kerryb is my blockchain ID. No, me neither. https://onename.com/kerryb |
| class RomanNumerals | |
| NUMBERS = { | |
| 1000 => "M", | |
| 900 => "CM", | |
| 500 => "D", | |
| 400 => "CD", | |
| 100 => "C", | |
| 90 => "XC", | |
| 50 => "L", | |
| 40 => "XL", |
| ytd() { | |
| ytd=$(find ~/Dropbox/Apps/tapiriik -name $(date +%Y)-*_Running*.tcx -print0 | xargs -0 -n1 awk '/DistanceMeters/ {a=$0} END {gsub(/\s*<[^>]*>/, "", a); print a}' | paste -sd+ - | sed 's/\(.*\)/0.000621371 * (\1)/' | bc | sed 's/\(\..\).*/\1/') | |
| proj=$(echo "$ytd * 365 / $(date +%j)" | bc) | |
| echo "YTD: $ytd. Projected: $proj" | |
| } |
| defmodule Child do | |
| def task(parent) do | |
| Process.sleep(:timer.seconds(2)) | |
| send(parent, :finished) | |
| end | |
| end |
A spike looking at adding basic given-when-then steps to ExUnit tests.
given_, when_ and then_ (unfortunately when is a reserved word)defwhen etc with a string matching the one used in the stepargs variable