Skip to content

Instantly share code, notes, and snippets.

View jsonforms-ui-metaschema.json
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"$id": "#root",
"properties": {
"type": {
"type": "string",
"enum": [
"HorizontalLayout",
"VerticalLayout",
@edgarmueller
edgarmueller / vdom-libs.md
Last active Sep 28, 2017
Virtual DOM Libs
View vdom-libs.md
View HomeController.java
package controllers;
import play.cache.SyncCacheApi;
import play.mvc.*;
import views.html.*;
import javax.inject.Inject;
/**
View LDAPUserVerifierTest.java
public class LDAPUserVerifierTest extends ESTestWithMockServer {
@BeforeClass
public static void beforeClass() {
startEMFStore();
}
@AfterClass
public static void afterClass() {
stopEMFStore();
View product.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Product",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for a product",
"type": "number"
},
"name": {
@edgarmueller
edgarmueller / library.json
Last active Dec 18, 2015
Example Library JSON Schema
View library.json
{
"definitions": {
"writer": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"books": {
"type": "array",
View gist:14b426671c07fa6be6ae
package com.example
import akka.actor.Actor
import reactivemongo.api.MongoDriver
import reactivemongo.bson.{BSONDocument, BSONDocumentReader, BSONObjectID, Macros}
import spray.httpx.SprayJsonSupport._
import spray.json._
import spray.routing._
import scala.concurrent.Future
import scala.util.{Failure, Success}
View gist:8ed5f4c2ad6c63e44202
package rest.spray.service
import akka.actor.Actor
import reactivemongo.api.MongoDriver
import reactivemongo.bson.{BSONDocument, BSONDocumentReader, BSONObjectID, Macros}
import spray.httpx.SprayJsonSupport._
import spray.json._
import spray.routing._
import scala.concurrent.Future
@edgarmueller
edgarmueller / gist:584c3d1faa933a4cb568
Created Jan 9, 2015
Json writes for a superclass in scala
View gist:584c3d1faa933a4cb568
trait PropertyType {
def price: Double
}
case class House(price: Double, noOfBedRooms: Option[Short]) extends PropertyType
case class Land(price: Double, area: Option[Double]) extends PropertyType
object House {
implicit val houseReads: Reads[House] = (
(JsPath \ "price").read[Double] and
View NotifierExample.scala
package mytest
import org.specs2.execute.Details
import org.specs2.mutable._
import org.specs2.reporter.Notifier
class MyNotifier extends Notifier {
override def exampleFailure(name: String, message: String,