This file contains hidden or 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
# goes into test/ directory | |
defmodule DemoTest do | |
use ExUnit.Case | |
use PropCheck | |
use PropCheck.StateM | |
doctest Demo | |
test "greets the world" do | |
assert Demo.hello() == :world | |
end |
This file contains hidden or 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
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." | |
# vi is good |
This file contains hidden or 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
defmodule CaseVsMapsFind do | |
use Benchfella | |
@hash Enum.zip(Enum.to_list(1..1000), Enum.to_list(1000..2000)) |> Enum.into(%{}) | |
bench "case match present key" do | |
v = 100 | |
case @hash do | |
%{^v => val} -> val | |
_ -> :error |