Skip to content

Instantly share code, notes, and snippets.

View johanprinsloo's full-sized avatar

Johan Prinsloo johanprinsloo

View GitHub Profile
@johanprinsloo
johanprinsloo / .ctags
Created February 17, 2012 22:30 — forked from jboner/.ctags
Scala CTags config file
--langdef=Scala
--langmap=Scala:.scala
--regex-Scala=/^[ \t]*class[ \t]*([a-zA-Z0-9_]+)/\1/c,classes/
--regex-Scala=/^[ \t]*object[ \t]*([a-zA-Z0-9_]+)/\1/o,objects/
--regex-Scala=/^[ \t]*trait[ \t]*([a-zA-Z0-9_]+)/\1/t,traits/
--regex-Scala=/^[ \t]*case[ \t]*class[ \t]*([a-zA-Z0-9_]+)/\1/r,cclasses/
--regex-Scala=/^[ \t]*case[ \t]*object[ \t]*([a-zA-Z0-9_]+)/\1/r,cobjects/
--regex-Scala=/^[ \t]*abstract[ \t]*class[ \t]*([a-zA-Z0-9_]+)/\1/a,aclasses/
--regex-Scala=/^[ \t]*def[ \t]*([a-zA-Z0-9_=]+)[ \t]*.*[:=]/\1/m,methods/
--regex-Scala=/[ \t]*val[ \t]*([a-zA-Z0-9_]+)[ \t]*[:=]/\1/V,values/
@johanprinsloo
johanprinsloo / mvn2sbt.scala
Created March 30, 2012 05:51 — forked from retronym/mvn2sbt.scala
mvn2sbt: quick hack to turn <dependencies> into SBT
#!/bin/sh
SCRIPT="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
DIR=`dirname "${SCRIPT}"}`
exec scala -savecompiled $0 $DIR $SCRIPT
::!#
import scala.xml._
object App {
def main(args: Array[String]): Unit = {
@johanprinsloo
johanprinsloo / TestMultipartFileUpload.scala
Created October 16, 2017 18:19 — forked from jrudolph/TestMultipartFileUpload.scala
akka-http Multipart file-upload client + server example
package akka.http.scaladsl
import java.io.File
import akka.http.scaladsl.unmarshalling.Unmarshal
import akka.util.ByteString
import scala.concurrent.duration._
import akka.actor.ActorSystem