This file contains hidden or 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
get("/:slug(.:format)(/)") { | |
if (params.get('slug).map(_.toLowerCase(ENGLISH)) == Some("index.json")) pass() | |
} | |
get("/(index(.:format))") { | |
} |
This file contains hidden or 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
# Upstart file for sinatra github hook | |
start on runlevel [2345] | |
stop on runlevel [06] | |
#console logged | |
#respawn | |
env RUBYOPT=rubygems |
This file contains hidden or 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
sudo initctl emit -n my-event |
This file contains hidden or 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
object BackchatString { | |
/** | |
* Remove non-latin signs from text regular expression | |
*/ | |
val NON_LATIN = """[^A-Za-z0-9\-\.]""".r | |
/** | |
* Remove whitespace regular expression | |
*/ | |
val WHITESPACE = """[\s]""".r |
This file contains hidden or 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
[warn] :: org.scalatra#scalatra-auth_2.9.0-1;2.0.0-SNAPSHOT: java.text.ParseException: [unknown tag project in file:/Users/ivan/.ivy2/cache/org.scalatra/scalatra-auth_2.9.0-1/ivy-2.0.0-SNAPSHOT.xml.original | |
[warn] , unknown tag modelVersion in file:/Users/ivan/.ivy2/cache/org.scalatra/scalatra-auth_2.9.0-1/ivy-2.0.0-SNAPSHOT.xml.original | |
[warn] , unknown tag groupId in file:/Users/ivan/.ivy2/cache/org.scalatra/scalatra-auth_2.9.0-1/ivy-2.0.0-SNAPSHOT.xml.original | |
[warn] , unknown tag artifactId in file:/Users/ivan/.ivy2/cache/org.scalatra/scalatra-auth_2.9.0-1/ivy-2.0.0-SNAPSHOT.xml.original | |
[warn] , unknown tag packaging in file:/Users/ivan/.ivy2/cache/org.scalatra/scalatra-auth_2.9.0-1/ivy-2.0.0-SNAPSHOT.xml.original | |
[warn] , unknown tag version in file:/Users/ivan/.ivy2/cache/org.scalatra/scalatra-auth_2.9.0-1/ivy-2.0.0-SNAPSHOT.xml.original | |
[warn] , unknown tag name in file:/Users/ivan/.ivy2/cache/org.scalatra/scalatra-auth_2.9.0-1/ivy-2.0.0-SNAPSHOT.xml.original | |
[warn] , unknown tag description in file: |
This file contains hidden or 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
object MultiMap { | |
type Coll = MultiMap | |
def apply(elems: (String, Seq[String])*): MultiMap = (newBuilder ++= elems).result | |
def newBuilder: Builder[(String, Seq[String]), MultiMap] = new MapBuilder[String, Seq[String], MultiMap](empty) | |
implicit def canBuildFrom: CanBuildFrom[Map[String, Seq[String]], (String, Seq[String]), MultiMap] = { | |
new CanBuildFrom[Map[String, Seq[String]], (String, Seq[String]), MultiMap] { |
This file contains hidden or 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 mojolly | |
package mongo | |
package tests | |
import org.specs2.Specification | |
import org.specs2.specification.{ Step, Fragments } | |
import net.liftweb.mongodb._ | |
import mongo.MongoConfig.MongoConfiguration | |
trait LiftMongoDbSpecification extends Specification { |
This file contains hidden or 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
#!/bin/sh | |
mkdir -p $WORKSPACE/project/boot/scala-2.8.1/org.scala-tools.sbt/sbt/0.10.1/extra | |
mkdir -p $WORKSPACE/../sbt/plugins/project | |
cp $HOME/share/java/*.jar $WORKSPACE/project/boot/scala-2.8.1/org.scala-tools.sbt/sbt/0.10.1/extra | |
cp $HOME/.sbt/plugins/Jenkins.scala $WORKSPACE/../sbt/plugins | |
cp $HOME/.sbt/plugins/project/build.scala $WORKSPACE/../sbt/plugins/project | |
java -Xms512m -Xmx2048m -XX:ReservedCodeCacheSize=256m -XX:MaxPermSize=512m -Xss8m -XX:+CMSClassUnloadingEnabled -Dsbt.global.base=$WORKSPACE/../sbt -Dfile.encoding='UTF-8' -Dsbt.ivy.home=$WORKSPACE/project/ivy2 -Dsbt.log.noformat=true -jar `dirname $0`/sbt-launch.jar "$@" |
This file contains hidden or 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
object PfExample { | |
val Path = """/users/(.*)""".re // pretty non-sensical in real life | |
def handleRequest: PartialFunction[Response] = { | |
case Path(theUserId) => { | |
// do heaps of stuff | |
// create response | |
} | |
} |
This file contains hidden or 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
<dependencies> | |
<exclude module="lift-common_2.9.0-1" /> | |
<exclude module="lift-actor_2.9.0-1" /> | |
<exclude module="lift-framework_2.9.0-1" /> | |
<exclude module="lift-record_2.9.0-1" /> | |
<exclude module="lift-util_2.9.0-1" /> | |
<exclude module="lift-webkit_2.9.0-1" /> | |
<exclude module="lift-json_2.9.0-1" /> | |
<exclude module="lift-json-ext_2.9.0-1" /> | |
<exclude module="lift-mongodb-record_2.9.0-1" /> |