I hereby claim:
- I am mcveat on github.
- I am mcveat (https://keybase.io/mcveat) on keybase.
- I have a public key ASBJkE7VqvqBmo3Y-AOdKqG10e1jSNrayzivXqkJcyCSLwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
implicit def eitherFormat[A, B](implicit af: Format[A], bf: Format[B]) = new Format[Either[A, B]] { | |
override def writes(o: Either[A, B]): JsValue = o match { | |
case Left(a) => af.writes(a) | |
case Right(b) => bf.writes(b) | |
} | |
override def reads(json: JsValue): JsResult[Either[A, B]] = | |
json.validate[B].map(Right.apply).orElse(json.validate[A].map(Left.apply)) | |
} |
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
lg = log -p | |
lsd = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
lld = log --graph --decorate --abbrev-commit --all | |
s = status --short | |
files = log --name-status --oneline | |
ri = rebase -i origin/master |
import spray.json._ | |
import reactivemongo.bson._ | |
import scala.util.{ Try, Success, Failure } | |
import org.apache.commons.codec.binary.Hex | |
import org.joda.time.format.ISODateTimeFormat | |
import org.joda.time.{DateTime, DateTimeZone} | |
import java.nio.ByteBuffer | |
/** | |
* From https://gist.github.com/nevang/4690568 |