Skip to content

Instantly share code, notes, and snippets.

@sonnym
sonnym / game_of_life.elm
Last active June 19, 2017 03:37
Game of Life in Elm
import List
import Random
import Time exposing (Time)
import Tuple exposing (first, second)
import Html exposing (Html, Attribute, div, text)
import Html.Attributes exposing (style)
type alias Grid = List (List Bool)
type Msg = Initialize Grid | Tick Time
@sonnym
sonnym / keybase.md
Last active August 29, 2015 14:15
keybase.md

Keybase proof

I hereby claim:

  • I am sonnym on github.
  • I am sonnym (https://keybase.io/sonnym) on keybase.
  • I have a public key whose fingerprint is DC9D 47E8 4A00 6BE7 F3E7 4780 0BD7 F8E6 349F 3C61

To claim this, I am signing this object:

@sonnym
sonnym / random_grid.elm
Created December 13, 2014 00:28
Crash elm
import Signal ((<~), Signal)
import Signal
import List ((::))
import List
import Time
import Random
import Color (rgb)
@sonnym
sonnym / gist:9106358
Created February 20, 2014 03:01
Controller mediator example
angular.module("FooBar").
service("ControllerMediator", function() {
var methodCache = {};
return {
registerMediator: function(name) {
methodCache[name] = { conditions: [] };
return this.run(name);
},