Skip to content

Instantly share code, notes, and snippets.

Avatar

Evan Chan velvia

View GitHub Profile
@colestanfield
colestanfield / gist:fac042d3108b0c06e952
Created Aug 8, 2014
sbt-assembly merge strategy for aop.xml files
View gist:fac042d3108b0c06e952
// Create a new MergeStrategy for aop.xml files
val aopMerge: MergeStrategy = new MergeStrategy {
val name = "aopMerge"
import scala.xml._
import scala.xml.dtd._
def apply(tempDir: File, path: String, files: Seq[File]): Either[String, Seq[(File, String)]] = {
val dt = DocType("aspectj", PublicID("-//AspectJ//DTD//EN", "http://www.eclipse.org/aspectj/dtd/aspectj.dtd"), Nil)
val file = MergeStrategy.createMergeTarget(tempDir, path)
View CORSDirectives.scala
package foo.bar
import spray.routing._
import spray.http._
import spray.http.StatusCodes.Forbidden
// See https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS
case class Origin(origin: String) extends HttpHeader {
You can’t perform that action at this time.