Skip to content

Instantly share code, notes, and snippets.

@renegr
renegr / snake.eve
Last active December 10, 2016 08:52
snake with eve
# Snake
*Implemented with eve 0.2.2 (on master: 44b086e91de8a1a70b11f12a1d0f6a08aeda6c15)*
Start by adding a game board wich is 30x30 big. We will place the player in the middle.
```
search
x = range[from:1, to:30]
y = range[from:1, to:30]
commit
[#game state:"menu" frame: 0 width: 30 height: 30]
@renegr
renegr / docker-compose.yml
Created November 10, 2016 10:29
eve-docker-patch
eve:
build: .
ports:
- 18080:8080
@renegr
renegr / oidc_connect.eve
Created November 4, 2016 18:10
OpenID Connect Client in Eve
# OpenID Connect - Client
OpenID Connect is a protocol used for authentication and authorization.
We are going to implement a reusable "component" to interact with
an OpenID Provider. Our OpenID Provider will be Keycloak, therefore
many implementation Details are Keycloak specific.
Therefore you'll find two parts:
- 0. -> Using the OpenID Connect Component
@renegr
renegr / etsy-fu.elm
Created April 16, 2014 14:34
The pleasantness of ELM
{-
As seen on: http://danielsz.github.io/2014/02/28/The-pleasantness-of-Om/
Additional feature: <SPACE> and Time advance
Missing feature: Randomizer for List
-}
import Keyboard
-- Model
type Testimonial = { shopName:String,
shopOwner:String,
@renegr
renegr / tree.clj
Created March 11, 2014 20:10
Functional Zippers
(ns tree
(:require [clojure.zip :as zip]))
(defn make-zip
"Returns a zipper for a given datastructure"
[root]
(zip/zipper (complement string?)
(comp seq :children)
(fn [node children]
(assoc node :children children))