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
if config.get('cdn') | |
ss.client.packAssets( | |
keepOldFiles:true | |
cdn: | |
js: (file) -> (config.get('cdn') + '/' + file.path.replace(/^.*[\\\/]/, '')) | |
css: (file) -> (config.get('cdn') + '/' + file.path.replace(/^.*[\\\/]/, '')) | |
html: (file) -> (config.get('cdn') + '/' + file.path.replace(/^.*[\\\/]/, '')) | |
) |
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
addNewUser:(token) -> | |
errorMessage = 'User no longer exists, try registering again!' | |
async.parallel( | |
user: (cb) -> db.pendingUsers.findOne(token:token,(err,result)-> | |
if !result? then cb(errorMessage) else cb(err,result) | |
) | |
group: (cb) -> db.pendingGroups.findOne(token:token,(err,result)-> | |
if !result? then cb(errorMessage) else cb(err,result) | |
) | |
,(err,results)-> |
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 com.monetise.grater.variables | |
import com.github.nscala_time.time.Imports._ | |
import com.monetise.grater.variables.Value._ | |
import com.monetise.grater.accounttypes.AccountTypeData | |
import scala.collection.mutable.ListBuffer | |
import scala.language.implicitConversions | |
sealed abstract class Variable | |
case object SavingsAmount extends Variable |
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 demo = inputKey[Unit]("A demo input task.") | |
val demoTask = demo := { | |
// get the result of parsing | |
val args: String = trimmed(StringBasic).parsed | |
// Here, we also use the value of the `scalaVersion` setting | |
println("The current Scala version is " + scalaVersion.value) | |
println("The arguments to demo were:") | |
println(args) | |
} |
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
get("/") { | |
contentType="text/html" | |
jade("index") | |
} | |
// get("/:page") { | |
// findTemplate(params("page")) map { path => | |
// contentType = "text/html" | |
// jade(path) | |
// } orElse serveStaticResource() getOrElse resourceNotFound() |
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
seq(jsSettings : _*) | |
(sourceDirectory in (Compile, JsKeys.js)) <<= (sourceDirectory in Compile)(_ / "coffee") | |
(sourceDirectory in (Test, JsKeys.js)) <<= (sourceDirectory in Test)(_ / "unit" / "coffee") | |
(resourceManaged in (Compile, JsKeys.js)) <<= (resourceManaged in (Compile, JsKeys.js))(_ / "js") | |
(resourceManaged in (Test, JsKeys.js)) <<= (resourceManaged in (Test, JsKeys.js))(_ / "unit" / "js") |
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 declinedBidIds = declinedBidsThisRound.map(_.user.id) | |
val currentBidsAlreadyMadeIds = currentBidsAlreadyMade.map(_.user.id) | |
val clientUsers = {for( | |
u <- Users if (u.id notIn declinedBidIds | |
&& u.completedSignup === true) | |
) yield u}.list |
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
name := "rubygems-test" | |
resolvers += "rubygems-releases" at "http://rubygems-proxy.torquebox.org/releases" | |
libraryDependencies ++= Seq("org.mdedetrich" % "java-premailer-wrapper" % "1.1_1.8.4") | |
scalaVersion := "2.11.7" |
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
With @inline | |
scalatagsJS/testOnly scalatags.text.ScalatagsPerf | |
[info] 1/3 scalatags.text.ScalatagsPerf.correctness.performance Success | |
[info] ScalatagsPerf 45273 in 10000 | |
[info] 2/3 scalatags.text.ScalatagsPerf.correctness Success | |
[info] 3/3 scalatags.text.ScalatagsPerf Success | |
[info] -----------------------------------Results----------------------------------- | |
[info] scalatags.text.ScalatagsPerf Success |
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
trait ArrayExtensions extends io.getquill.context.jdbc.JdbcEncoders with io.getquill.context.jdbc.JdbcDecoders { | |
this: JdbcContext[PostgresDialect, _] => | |
implicit def arrayStringDecoder[T]: Decoder[Array[String]] = | |
new Decoder[Array[String]] { | |
def apply(index: Int, row: ResultRow) = { | |
row.getArray(index + 1).getArray.asInstanceOf[Array[String]] | |
} | |
} |
OlderNewer