Skip to content

Instantly share code, notes, and snippets.

View gist:4103397
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Spring Web MVC Application</display-name>
<servlet>
<servlet-name>rest</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
View gist:4103234
app
core
src/main/java/org/example
presentation
ValidationDto
ValidationJSONConverter
ValidationHandlerExceptionResolver
infrastructure
EnrichedReadWriteHibernateRepository
SessionFactoryFactory
@williamboxhall
williamboxhall / iterables.scala
Created Dec 23, 2014
higher order functions w/ generic collections
View iterables.scala
val setToSet: Set[Int] => Set[String] = { _.map(_.toString + "potato")}
val listToList: List[Int] => List[String] = { _.map(_.toString + "tomato")}
val listToIterable: List[Int] => Iterable[String] = { _.map(_.toString + "ristretto")}
println(setToSet(Set(1,2)))
println(listToList(List(1,2)))
println(listToIterable(List(1,2)))
def printer(fn: Iterable[Int] => Iterable[String], inputs: Iterable[Int]) = println(fn(inputs))
printer(setToSet, Set(1,2)) // doesn't compile
printer(listToList, List(1,2)) // doesn't compile
@williamboxhall
williamboxhall / BDDContrivedScenario.java
Last active Aug 29, 2015
BDD End-to-End Scenario example
View BDDContrivedScenario.java
package org.example.feature;
...
public class BDDContrivedScenario extends Scenario {
private Mail mail;
@Given("I have sent a mail to two people with response required")
public void givenIHaveSentAMailToTwoPeopleWithResponseRequired() {
as(ME).on(HOTEL_VIP).onThe(NEW_MAIL_PAGE).createAndSend(responseRequiredMailTo(COLLEAGUE, AFFILIATE));