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
defmodule Encoders do | |
alias Jason.Encoder | |
alias Encoder.BitString | |
defimpl Encoder, for: Tuple do | |
def encode(data, options) when is_tuple(data) do | |
data | |
|> Tuple.to_list() | |
|> Encoder.List.encode(options) | |
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
@hp | |
Property: HP | |
HP stands for health points and denotes whether an entity is alive or | |
dead. | |
@valid | |
Given HP | |
When valid | |
Then it must be a natural number | |
And greater than or equal to 0 |
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
def run_all(path, dest) do | |
:fprof.trace([:start, verbose: true, procs: :all]) | |
"#{path}/*.feature" | |
|> Path.wildcard() | |
|> Enum.map(&execute/1) | |
:fprof.trace(:stop) | |
:fprof.profile() | |
:fprof.analyse(totals: false, dest: '#{dest}.analysis') |
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
Kindly see comments below |
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
Here are some screenshots |
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
```elixir | |
%ElixirSense.Core.Metadata{calls: %{ | |
7 => [%ElixirSense.Core.State.CallInfo{arity: 0, func: :atom, mod: nil, position: {7, 11}}, %ElixirSense.Core.State.CallInfo{arity: 1, func: :a, mod: nil, position: {7, 9}}, %ElixirSense.Core.State.CallInfo{arity: 1, func: :spec, mod: nil, position: {7, 4}}], | |
10 => [%ElixirSense.Core.State.CallInfo{arity: 0, func: :hello, mod: nil, position: {10, 9}}, %ElixirSense.Core.State.CallInfo{arity: 1, func: :spec, mod: nil, position: {10, 4}}]}, error: nil, | |
lines_to_env: %{ | |
1 => %ElixirSense.Core.State.Env{aliases: [], attributes: [], behaviours: [], imports: [], module: Dummy, module_variants: [Dummy], protocol: nil, protocol_variants: [], requires: [], scope: :Dummy, scope_id: 1, vars: []}, | |
7 => %ElixirSense.Core.State.Env{aliases: [], attributes: [], behaviours: [], imports: [], module: Dummy, module_variants: [Dummy], protocol: nil, protocol_variants: [], requires: [], scope: :Dummy, scope_id: 2, vars: []}, | |
8 => %ElixirSense.Core.State.Env{aliases: [], attrib |
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
%ElixirSense.Core.Metadata{calls: %{ | |
7 => [%ElixirSense.Core.State.CallInfo{arity: 0, func: :atom, mod: nil, position: {7, 11}}, %ElixirSense.Core.State.CallInfo{arity: 1, func: :a, mod: nil, position: {7, 9}}, %ElixirSense.Core.State.CallInfo{arity: 1, func: :spec, mod: nil, position: {7, 4}}], | |
10 => [%ElixirSense.Core.State.CallInfo{arity: 0, func: :hello, mod: nil, position: {10, 9}}, %ElixirSense.Core.State.CallInfo{arity: 1, func: :spec, mod: nil, position: {10, 4}}]}, error: nil, | |
lines_to_env: %{ | |
1 => %ElixirSense.Core.State.Env{aliases: [], attributes: [], behaviours: [], imports: [], module: Dummy, module_variants: [Dummy], protocol: nil, protocol_variants: [], requires: [], scope: :Dummy, scope_id: 1, vars: []}, | |
7 => %ElixirSense.Core.State.Env{aliases: [], attributes: [], behaviours: [], imports: [], module: Dummy, module_variants: [Dummy], protocol: nil, protocol_variants: [], requires: [], scope: :Dummy, scope_id: 2, vars: []}, | |
8 => %ElixirSense.Core.State.Env{aliases: [], attributes: [], |
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
-module(palin). | |
-export([distributer/0, distributer/1, client/1, server/1, palin/1, nopunct/1, palindrome/1]). | |
distributer() -> | |
distributer({spawn(palin, server, ["A"]), spawn(palin, server, ["B"])}). | |
distributer({Server1, Server2}) -> | |
receive | |
{result, Msg} -> | |
io:format(Msg), |
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
# edit commit msg | |
git commit --amend | |
# delete accidental commits made to master | |
git reset d3adfb9dd33d74815f445e6ace76501ff5a4208d | |
git reset --hard |
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
use sdformatter | |
diskutil list | |
sudo diskutil unmountDisk /dev/disk3 | |
sudo dd of=/dev/rdisk3 if=/Users/Coder/Downloads/2016-02-09-raspbian-jessie\ 2.img bs=4m | |
sudo diskutil mountDisk /dev/disk3 |
NewerOlder