Skip to content

Instantly share code, notes, and snippets.

View abdheshkumar's full-sized avatar

Abdhesh Kumar abdheshkumar

View GitHub Profile
package object mail {
implicit def stringToSeq(single: String): Seq[String] = Seq(single)
implicit def liftToOption[T](t: T): Option[T] = Some(t)
sealed abstract class MailType
case object Plain extends MailType
case object Rich extends MailType
case object MultiPart extends MailType
/*
* Copyright (C) 2012 47 Degrees, LLC
* http://47deg.com
* hello@47deg.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
scalaVersion := "2.9.1"
resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/releases"
libraryDependencies ++= Seq(
"play" %% "anorm" % "2.0-RC4",
"com.github.seratch" %% "scalikejdbc" % "[0.5,)",
"org.hsqldb" % "hsqldb" % "[2,)"
)
package code.lib
import net.liftweb._
import http._
import util._
import Helpers._
import common._
import mongodb._
import com.mongodb._
@abdheshkumar
abdheshkumar / AnalyticsLeader.scala
Last active August 29, 2015 14:27 — forked from ryantanner/AnalyticsLeader.scala
Conspire's implementation of work pulling
class AnalyticsLeader(supervisor: ActorRef) extends Leader[ProcessUser, AnalyticsNode, AnalyticsMessage](supervisor)
import scala.collection.mutable
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.{Await, Future}
import scala.concurrent.duration.Duration
case class User(id: Long, name: String)
@free trait UserRepository[F[_]] {
def get(id: Long): FreeS[F, Option[User]]
import freestyle._
import freestyle.implicits._
import freestyle.implicits.interpretAp
import cats.implicits._
case class ValidationResult(isValid:Boolean, events:List[Event])
trait Command
case class UnknownCommand(cmd:Any) extends Command
sealed trait Event {val name:String}
import cats.Id
import cats.implicits._
import freestyle._
import freestyle.implicits._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
/**
* Created by abdhesh on 05/05/17.
@abdheshkumar
abdheshkumar / README.md
Created July 9, 2017 09:46 — forked from pathikrit/README.md
My highly opinionated list of things needed to build an app in Scala
Command:
connect\n\n
Response:
Event-Name: CHANNEL_DATA
Core-UUID: d01fd5af-47d1-4cc0-9135-72be72656b21
FreeSWITCH-Hostname: abdhesh-System-Product-Name
FreeSWITCH-Switchname: abdhesh-System-Product-Name
FreeSWITCH-IPv4: 10.0.0.29
FreeSWITCH-IPv6: %3A%3A1