Skip to content

Instantly share code, notes, and snippets.

View Kociamber's full-sized avatar
🐈

Rafał Kociszewski Kociamber

🐈
View GitHub Profile
@Kociamber
Kociamber / ExampleGenServer.ex
Last active October 25, 2017 13:49
Example implementation of Elixir GenServer and some nice comments.
defmodule ExampleGenServer do
use GenServer
## Client API
# Starts detached process of GenServer
def start_link do
# Fisrt arg is a GenServer's module name, second one is its initial state and/or its type
# Name of a process can be specified (name: :name) but it also prevents of running multiple process of the same type
GenServer.start_link(__MODULE__, [])
end
@Kociamber
Kociamber / README.md
Created May 17, 2016 07:43 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation