Skip to content

Instantly share code, notes, and snippets.

@ghostdogpr
ghostdogpr / Derivation.scala
Last active February 8, 2025 08:46
Sum Type Derivation
import scala.annotation.nowarn
import scala.deriving.Mirror
trait TC[A] {
def show(a: A): Unit
}
@nowarn
inline def gen[A](using m: Mirror.SumOf[A]): TC[A] = {
val subTypes = compiletime.summonAll[Tuple.Map[m.MirroredElemTypes, TC]]
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active May 13, 2025 07:11
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents