Skip to content

Instantly share code, notes, and snippets.

View Baccata's full-sized avatar

Olivier Mélois Baccata

View GitHub Profile
@Baccata
Baccata / repro.scala
Last active June 9, 2023 13:28
Reproduction of a http/2 specific problem with http4s-ember-server
//> using lib "org.http4s::http4s-ember-server:0.23.19"
//> using lib "org.http4s::http4s-dsl:0.23.19"
package foo
import cats.effect._
import cats.syntax.all._
import org.http4s.implicits._
import org.http4s.ember.server._
import org.http4s._
@Baccata
Baccata / hoconLeftovers.scala
Last active August 28, 2024 08:41
Poor man's solution for getting the "remainder" of a hocon config after its decoding, in order to increase confidence when moving/deleting config values
//> using dep "com.typesafe:config:1.4.3"
//> using dep "com.github.pureconfig::pureconfig:0.17.6"
//> using scala "2.13.14"
import com.typesafe.config._
import pureconfig.generic.semiauto._
import pureconfig.ConfigReader
import pureconfig.ConfigSource
import java.{util => ju}
@Baccata
Baccata / echo.scala
Created October 3, 2024 13:22
Generically producing scalacheck `Gen` instances from ScalaPB generated code. Mostly useless
package foo
import scalapb.GeneratedMessageCompanion
import scalapb.descriptors._
import org.scalacheck.Gen
import com.google.protobuf.ByteString
import scalapb.GeneratedMessage
object ProtoScalacheck {