Skip to content

Instantly share code, notes, and snippets.

View seeekr's full-sized avatar

Denis Andrejew seeekr

  • productioneer.io
  • Austria
View GitHub Profile
@seeekr
seeekr / confix.ex
Last active August 14, 2017 14:43 — forked from jmglov/config.ex
Elixir: override Mix config with environment variables
defmodule Confix do
defmacro __using__(app: app_name) do
quote do
import unquote(__MODULE__), only: :macros
@confix_app unquote(app_name)
end
end
defmacro cfg(key, type \\ :string) do