Skip to content

Instantly share code, notes, and snippets.

View rcardin's full-sized avatar
🎯
Focusing on functional programming skills

Riccardo Cardin rcardin

🎯
Focusing on functional programming skills
View GitHub Profile
@leonelag
leonelag / 403.jsp
Created October 4, 2012 12:23
Advanced Spring Security. How to configure Spring beans to set up Spring Security without using the Spring Security namespace.
<%@page contentType="application/json; charset=UTF-8"%>{"status":"nauth","message":"Not authorized."}
@pierangeloc
pierangeloc / doobie_newtype.scala
Last active November 23, 2021 13:25
Doobie instances for NewType
import io.estatico.newtype.ops._
import io.estatico.newtype.macros.newtype
import eu.timepit.refined.api.Refined
import doobie.implicits._
import doobie.postgres.implicits._
import doobie.refined.implicits._
/**
* Derive a Put (so it can be interpolated in doobie sql expressions) for any newtype backed by a type that is
* supported by doobie (e.g. any wrapper of String, UUID, Boolean etc)