Alpine: 3.4 Elixir: 1.3.4 Erlang: R18
linux-headers erlang-snmp
| defmodule Box do | |
| defmacro __using__(_env) do | |
| quote do | |
| import Box | |
| end | |
| end | |
| @doc """ | |
| Define module with struct and typespec, in single line |
| defmodule Appsignal.Plug.JSExceptionCatcher do | |
| @behaviour Plug | |
| import Plug.Conn | |
| alias Appsignal.Transaction | |
| @defaults [ | |
| path: "/appsignal_error_catcher", | |
| namespace: :frontend | |
| ] |
| defmodule Twin do | |
| @moduledoc """ | |
| See http://teamon.eu/2017/different-approach-to-elixir-mocks-doubles/ | |
| Example usage | |
| defmodule MyApp.Main do | |
| @api Twin.get(MyApp.Api) | |
| def run do |
| #!/bin/bash | |
| set -e | |
| VERSION="1" | |
| IMAGE="hello/simple" | |
| _run(){ | |
| echo "----> $@" | |
| $@ |
| defmodule Double do | |
| @moduledoc """ | |
| See http://teamon.eu/2017/different-approach-to-elixir-mocks-doubles/ | |
| """ | |
| ## GEN SERVER | |
| use GenServer | |
| ## CLIENT API |
| defmodule Recruitee.Repo do | |
| use Ecto.Repo, otp_app: :recruitee | |
| import Ecto.Query | |
| @doc """ | |
| Stream query results | |
| Example: | |
| iex> Candidate | |
| ...> |> where([c], c.foo > 4) |
| defmodule Sync.Middleware.RateLimit do | |
| @defaults [ | |
| delay: 2000, | |
| max_retries: 5 | |
| ] | |
| def call(env, next, opts) do | |
| opts = opts || [] | |
| delay = Keyword.get(opts, :delay, @defaults[:delay]) | |
| max_retries = Keyword.get(opts, :max_retries, @defaults[:max_retries]) |
| # ~/.gitconfig | |
| [core] | |
| excludesfile = /Users/[YOUR USER NAME]/.gitignore_global |