Skip to content

Instantly share code, notes, and snippets.

View ChrizH's full-sized avatar

Christian Hofer ChrizH

View GitHub Profile
@MaximilianoFelice
MaximilianoFelice / builder-phantom-types.scala
Last active July 26, 2023 22:49
A Builder example in Scala using Phantom Types
case class Food(ingredients: Seq[String])
class Chef[Pizza <: Chef.Pizza] protected (ingredients: Seq[String]) {
import Chef.Pizza._
def addCheese(cheeseType: String): Chef[Pizza with Cheese] = Chef(ingredients :+ cheeseType)
def addTopping(toppingType: String): Chef[Pizza with Topping] = Chef(ingredients :+ toppingType)
def addDough: Chef[Pizza with Dough] = Chef(ingredients :+ "dough")
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active June 20, 2024 11:54
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@staltz
staltz / introrx.md
Last active July 29, 2024 05:55
The introduction to Reactive Programming you've been missing