Skip to content

Instantly share code, notes, and snippets.

View kennethcalamay's full-sized avatar

Björn Calamay kennethcalamay

View GitHub Profile
@kennethcalamay
kennethcalamay / better_numbers_to_words.exs
Created May 18, 2023 06:16 — forked from pmarreck/better_numbers_to_words.exs
Numbers to words, version 2, in Elixir
defmodule MathThatShouldHaveBeenInStockElixirAlready do
def int_pow10(num, 0), do: num
def int_pow10(num, pow) when pow > 0, do: int_pow10(10 * num, pow - 1)
end
defmodule NumbersToWords do
alias MathThatShouldHaveBeenInStockElixirAlready, as: Math
def parse(0), do: "zero"
@kennethcalamay
kennethcalamay / README.md
Last active September 16, 2015 06:17 — forked from joakimk/README.md
CircleCI elixir build example

This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.

We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.

It should be generic enough to work on any elixir app using mix.

If you have a elixir_buildpack.config, then enable that section in the build script to keep versions in sync!