Skip to content

Instantly share code, notes, and snippets.

View kitofr's full-sized avatar

Kristoffer Roupé kitofr

  • Stockholm, Sweden
View GitHub Profile
@mattyw
mattyw / pierre.exs
Last active December 18, 2015 04:19
Walk the line from http://learnyouahaskell.com/a-fistful-of-monads#walk-the-line done in elixir. The first version shows the advantage of the pipe operator. The update shows us testing for preconditions with 'when' and also using patten matching to make the landleft and right functions easier to read.
# Inspired by:
# http://learnyouahaskell.com/a-fistful-of-monads#walk-the-line
# Put simply, pierre is a tight rope walker. birds land on the left
# or right of his pole. If the difference is > 3 he falls off
ExUnit.start
defmodule WalkTheLine do
use ExUnit.Case
@claj
claj / swarmec2.txt
Created September 19, 2012 11:04
Swarm on EC-2
How to get started with a swarm-setup on EC-2
=============================================
Launch instance
---------------
Switch to the close region (EU West for us).
Start an EC-2 instance, I selected Ubuntu 12 server, Small instance type.