Skip to content

Instantly share code, notes, and snippets.

View ichistmeinname's full-sized avatar

Sandra Dylus ichistmeinname

View GitHub Profile
@spyesx
spyesx / docker-cheat-sheet.md
Last active February 15, 2024 10:04 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Stop all containers

$ docker stop $(docker ps -q)

Build docker image

$ cd /path/to/Dockerfile
{-# LANGUAGE Rank2Types, FunctionalDependencies, FlexibleInstances #-}
import Control.Monad (liftM, ap)
import qualified Data.Set as S
newtype SM a = SM {fromSM :: forall r. SetM a r => r}
class SetM a r | r -> a where
{-Instances of 'SetM' must satisfy the following laws:
* @'fromSet' s = 'fromList' $ 'Data.Set.toList' s@
@VictorTaelin
VictorTaelin / binary_addition.md
Last active November 30, 2017 13:22
Binary addition on the abstract algorithm!

This is a term that performs modulo 32 addition on two 32-bit binary numbers efficiently on the abstract algorithm.

On this example, I compute 279739872 + 496122620 = 775862492.

binSize= 32
binZero= (binSize r.a.b.c.(a r) a.b.c.c)
binSucc= (binSize r.x.a.b.c.(x b x.(a (r x)) c) a.a)
binFold= x.a.b.c.(binSize r.x.(x x.f.(a (f x)) x.f.(b (f x)) f.c r) a.c x)
binToNat= (binSize r.n.x.(x x.f.(f x) x.f.(add n (f x)) f.0 (r (mul 2 n))) n.x.0 1)
@inamiy
inamiy / SwiftElmFrameworkList.md
Last active March 11, 2024 10:20
React & Elm inspired frameworks in Swift