Skip to content

Instantly share code, notes, and snippets.

View andyczerwonka's full-sized avatar

Andy Czerwonka andyczerwonka

View GitHub Profile
@andyczerwonka
andyczerwonka / TransformationTest.scala
Last active December 15, 2020 19:43
Chimney Coproduct Case
import io.scalaland.chimney.dsl._
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
class TransformationTest extends AnyFunSuite with Matchers {
sealed trait A extends Product with Serializable
object A {
case class Foo(s: String) extends A
case class Bar(kvs: Map[String, Int]) extends A
import java.io.{InputStream, OutputStream}
import com.amazonaws.services.lambda.runtime.{Context, RequestStreamHandler}
import com.softwaremill.sttp._
import io.circe.Json
import io.circe.generic.auto._
import io.circe.parser._
import io.circe.syntax._
class JiraDiscord extends RequestStreamHandler with Helpers {
override def handleRequest(input: InputStream, output: OutputStream, context: Context): Unit = {
val logger = context.getLogger
<!DOCTYPE html>
<html lang="en-us">
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<title>Picking Up the Camera with a Gallery</title>
import scala.util.Try
/**
* Type-safe UUID wrapper that encodes the type it relates to. This class explicitly hides its
* UUID value to prevent converting it between types.
*/
class UUID[A] private(private val uuid: UUID.Raw) {
override def toString = uuid.toString
}
import io.fury.Fury
import io.fury.config.Language
import org.junit.Test
import org.scalatest.Assertions._
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.util.Base64
import java.util.zip.GZIPInputStream
import java.util.zip.GZIPOutputStream