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
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 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 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 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 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 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 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 controllers; | |
import play.*; | |
import play.mvc.*; | |
import play.libs.F.*; | |
import views.html.*; | |
public class Application extends Controller { | |
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
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings( | |
compile in Compile <<= (compile in Compile, sourceDirectory in Compile, classDirectory in Compile, dependencyClasspath in Compile) map { (analysis, src, classes, classpath) => | |
val allKotlinSources: Seq[java.io.File] = (src ** ".kotlin").get | |
// call the kotlin compiler using `classpath` and output classes to `classes` | |
analysis | |
} |
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
{ scopeName = 'text.html.scala'; | |
fileTypes = ( 'scala.html' ); | |
foldingStartMarker = '(?x) | |
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?> | |
|<!--(?!.*-->) | |
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) | |
)'; | |
foldingStopMarker = '(?x) | |
(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)> | |
|^\s*--> |
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
public static class ManagedDatasource { | |
final BoneCPDataSource ds; | |
final String url; | |
public ManagedDatasource(BoneCPDataSource ds, String url) { | |
this.ds = ds; | |
this.url = url; | |
} |