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
# --- !Ups | |
CREATE TABLE users( | |
email VARCHAR(255) NOT NULL PRIMARY KEY, | |
name VARCHAR(255) | |
); | |
CREATE TABLE subjects( | |
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
title LONGTEXT NOT NULL, |
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
import play.api._ | |
import play.api.mvc._ | |
object Global extends GlobalSettings { | |
def ResponseTime[A](action: Action[A]): Action[A] = Action(action.parser) { request => | |
val start = System.currentTimeMillis | |
val result = action(request) | |
println( request + " -> " + (System.currentTimeMillis - start) + " ms.") | |
result |
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
web: target/start -Dhttp.port=${PORT} -Dconfig.resource=prod.conf ${JAVA_OPTS} |
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
interface Person { | |
name: string; | |
} | |
var f = function(p: Person): number { | |
return p.name.length | |
} | |
var a = 'COCO' | |
var b = f({ |
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
@-webkit-keyframes coloredSpans | |
{ | |
0% { background: #97e733; } | |
12% { background: #47ff74; } | |
25% { background: #3cf1f3; } | |
37% { background: #77cbfd; } | |
50% { background: #f19efd; } | |
62% { background: #fa87fd; } | |
75% { background: #fb9594; } | |
87% { background: #fdba3e; } |
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
.settings( | |
resolvers += "GB Play nightlies - Maven" at "http://guillaume.bort.fr/repository/" | |
) |
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
val main = play.Project(appName, appVersion, appDependencies).settings( | |
resourceGenerators in Compile <+= (target, resourceManaged in Compile, cacheDirectory, streams) map { (target, resources, cache, streams) => | |
val logger = streams.log | |
val sassWorkingDir = target / "sass-blabla" | |
if(!sassWorkingDir.exists) { | |
val maybeSass = this.getClass.getClassLoader.getParent.asInstanceOf[java.net.URLClassLoader].getURLs.map(_.getFile).map(file).find { 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
> compile | |
[info] Compiling 1 Scala source to /private/tmp/my/target/scala-2.10/classes... | |
> Analysing SQL: select name, age from people where age > ? | |
-- Parameters: | |
java.lang.Integer | |
-- Returns: | |
java.lang.String | |
java.lang.Integer | |
------------- |
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
{ | |
"Main" : { | |
"body" : { | |
"type" : "StructuredText", | |
"config" : { | |
"imageConstraint" : { | |
"width" : 580.0 | |
}, | |
"minHeight" : "400px" | |
} |
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
{"id":26,"label":"document","children":[{"id":14,"label":"heading1","children":[{"id":15,"content":"SURFACEPAD “THE ONLY CASE I WOULD CONSIDER USING WITH AN IPHONE”","parents":"14-26","tags":[]}],"parents":"26","tags":[]},{"id":16,"label":"paragraph","children":[{"id":17,"content":"This SurfacePad review is just so good we had to share it with you. If you’ve been following our SurfacePad for iPhone news, you already know it’s a product for, well, people who would rather their iPhone be au naturale…but they want to protect the screen and back from keys and hard surfaces. Gizmodo editor Jesus Dias gets it. In his doesn’t-mince-words-words:","parents":"16-26","tags":[]}],"parents":"26","tags":[]},{"id":18,"label":"paragraph","children":[{"id":19,"content":"“No, you don’t need a damn case for your iPhone 5—but if you have butterfingers and you must use a case, this seems to me like the only acceptable one. The SurfacePad is not only simple and elegant—complementing the iPhone’s design rather than turning it into |