Skip to content

Instantly share code, notes, and snippets.

@Kavec
Kavec / SketchSystems.spec
Created March 27, 2019 20:34
Shipment Dangerous Goods Flow
Shipment Dangerous Goods Flow
Standard User
Non DG*
edit cargo -> DG Cargo Classifier
Core Left - Non DG&
Do not show DG Review Status
No blocks on shipment movement
Has DG
@Kavec
Kavec / SketchSystems.spec
Last active March 27, 2019 20:29
Shipment Dangerous Goods Flow
Shipment Dangerous Goods Flow
Standard User
Non DG*
edit cargo -> DG Cargo Classifier
Core Left - Non DG&
Do not show DG Review Status
No blocks on shipment movement
Has DG
test "blah" do
loop = fn f ->
receive do
:die -> exit(:normal)
end
f.(f)
end
y = fn f ->
@Kavec
Kavec / badfizz.exs
Last active October 29, 2015 07:06
An overpowered, lazy FizzBuzz using macros and Elixir's Stream module.
#!/usr/bin/env elixir
defmodule BadFizz do
# See "Other Notes" section for more on this macro.
defmacrop automate_fizz(fizzers, n) do
# To begin, we need to process fizzers to produce the various components
# we're using in the final assembly. As told by Mickens telling as Antonio
# Banderas, first you must specify a mapping function:
build_parts = (fn {fz, n} ->
ast_ref = {fz |> String.downcase |> String.to_atom, [], __MODULE__}
#!/usr/bin/env elixir
defmodule Examples do
import Kernel, except: [@: 1]
defmacro __using__(_opts) do
quote do
import Kernel, except: [@: 1]
import Examples, only: [@: 1]
defmodule Examples do
import Agent, only: [
start_link: 2, get: 2, update: 2, get_and_update: 2]