Skip to content

Instantly share code, notes, and snippets.

View harrylaou's full-sized avatar

Harry Laoulakos harrylaou

View GitHub Profile
@harrylaou
harrylaou / CaseClassToMap.scala
Last active September 6, 2021 03:56
Converting case classes to Maps using Shapeless
package com.harrylaou
import shapeless._
import shapeless.ops.product._
import shapeless.syntax.std.product._
/**
* Converting case classes to Maps using Shapeless
*
*
@harrylaou
harrylaou / designer.html
Last active September 4, 2016 22:10
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
@harrylaou
harrylaou / DummyController.scala
Last active November 20, 2016 18:14
Emm Example
package controllers
import application.AppComponents.DatabaseSB
import cats.data.Xor
import cats.implicits._
import emm._
import emm.compat.cats._
import models.User
import play.api.Logger.logger
import play.api.libs.json.{Format, JsValue, Json, Reads, Writes}
@harrylaou
harrylaou / EitherConstructors.scala
Last active May 3, 2018 13:42
Monad Transformers package - just import utils.fee._ , to start using it
package utils.fee
import application.logger.MyLogger.RichLogger
import application.logger.MyLoggerT
import cats.syntax.EitherSyntax
import play.api.mvc.Results
import scala.util.Try
trait EitherConstructors extends EitherSyntax {
@harrylaou
harrylaou / AppComponents.scala
Last active May 11, 2018 14:52
Compile time DI for play
package application
import akka.actor.Scheduler
import application.filters.ExampleFilter
import com.typesafe.config.Config
import controllers.HomeController
import play.api.ApplicationLoader.Context
import play.api.BuiltInComponentsFromContext
import play.api.cache.EhCacheComponents
import router.Routes