Skip to content

Instantly share code, notes, and snippets.

@lattenwald
lattenwald / router.ex
Created April 6, 2018 14:49 — forked from aportnov/router.ex
Elixir: Compiled EEx templates in Plug application
defmodule MyModule.Router do
@moduledoc """
Http Entry Point
"""
use Plug.Router
use Plug.ErrorHandler
plug Plug.Logger
plug :match
@lattenwald
lattenwald / emacs.org
Created September 16, 2016 17:56 — forked from jaseemabid/emacs.org
Setup Emacs dev env for Erlang

Setup with Emacs Development environment with EDTS, Flycheck and use-package

This tutorial assumes a reasonably new version of Emacs (24.4+)

EDTS

Erlang Development Tool Suite aims to provide common IDE like functionality.

Use-package

@lattenwald
lattenwald / decode.md
Created August 24, 2016 12:42 — forked from yang-wei/decode.md
Elm Json.Decode tutorial and cheatsheet

When receiving JSON data from other resources(server API etc), we need Json.Decode to convert the JSON values into Elm values. This gist let you quickly learn how to do that.

I like to follow working example code so this is how the boilerplate will look like:

import Graphics.Element exposing (Element, show)
import Task exposing (Task, andThen)
import Json.Decode exposing (Decoder, int, string, object3, (:=))

import Http