Skip to content

Instantly share code, notes, and snippets.

View johninvictus's full-sized avatar
🎯
Focusing

john invictus johninvictus

🎯
Focusing
View GitHub Profile
@johninvictus
johninvictus / duration_parser.ex
Created December 22, 2020 13:02
duration_parser.ex
defmodule DurationParser do
@moduledoc """
Parse a given string as either a time interval or a fractional number of hours
and return the equivalent number of hours and minutes.
## Examples
iex> DurationParser.parse_minutes("2:15")
{:ok, 135}
**Privacy Policy**
STRACK KENYA LIMITED built the Strack Manager app as a Free app. This SERVICE is provided by STRACK KENYA LIMITED at no cost and is intended for use as is.
This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.
If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. we will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Strack Manager unless otherwise defined in this Privacy Policy.
**Privacy Policy**
STRACK KENYA LIMITED built the Strack Client app as a Free app. This SERVICE is provided by STRACK KENYA LIMITED at no cost and is intended for use as is.
This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.
If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. we will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Strack Client unless otherwise defined in this Privacy Policy.
@johninvictus
johninvictus / Flexible Dockerized Phoenix Deployments.md
Created May 26, 2018 19:08 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai