This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ g8 EnMAS/pomdp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -jar <path-to-jar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolvers += "Sonatype OSS" at "https://oss.sonatype.org/content/groups/public/" | |
libraryDependencies += "org.enmas" %% "enmas-core" % "1.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<repository> | |
<id>sonatype-oss-public</id> | |
<url>https://oss.sonatype.org/content/groups/public/</url> | |
<releases> | |
<enabled>true</enabled> | |
</releases> | |
</repository> | |
<dependency> | |
<groupId>org.enmas</groupId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import scala.reflect.runtime.universe._ | |
object ReflectionHelpers extends ReflectionHelpers | |
trait ReflectionHelpers { | |
protected val classLoaderMirror = runtimeMirror(getClass.getClassLoader) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def collapse(s: String, target: Char): String = collapse(s.toSeq, target).mkString | |
def collapse[T](s: Seq[T], target: T): Seq[T] = s match { | |
case Seq() => Seq[T]() | |
case t0 +: t1 +: tail if t0 == target && t1 == target => | |
collapse(target +: tail, target) | |
case t +: tail => t +: collapse(tail, target) | |
} | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// implementation... | |
import scala.collection.mutable.{ ArrayBuffer, ObservableBuffer, Undoable } | |
import scala.collection.script.{ Message, Include } | |
import java.io.Closeable | |
import java.util.concurrent.LinkedBlockingQueue | |
/** | |
* A thread-safe, bounded, mutable event buffer. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Versioned | |
import scala.math.{ Ordered, Ordering } | |
import scala.collection.{ SortedSet, SortedSetLike } | |
trait Versioned[V <: Ordered[V]] { | |
val version: V | |
} | |
object Versioned { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
yellow=$(tput setaf 3) | |
green=$(tput setaf 2) | |
cyan=$(tput setaf 6) | |
purple=$(tput setaf 5) | |
bold=$(tput bold) | |
reset=$(tput sgr0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ http DELETE localhost:9000/doc | |
HTTP/1.1 200 OK | |
Content-Length: 2 | |
Server: Jetty(8.1.13.v20130916) | |
OK | |
$ http GET localhost:9000/doc | |
HTTP/1.1 200 OK | |
Content-Length: 52 |