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
case class SearchCategory( | |
id: Option[Long], | |
created: DateTime, | |
modified: DateTime, | |
name: Option[String] = None | |
) { | |
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
AccountRepository.find().map { accounts => | |
accounts.map { account => | |
val eligable = reviewService.receivedReviewedInDays(account.recoInfo.recoId, millis).map { | |
b => { | |
account.recoInfo.recoId -> b | |
} | |
}.collect { | |
case (r, false) => r | |
}.map { r => | |
taskService.isRecoIdEligibleForTask(r).map { |
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 plugins | |
import play.api.{Logger, Plugin, Application} | |
import scala.concurrent.Future | |
import models.{Lead, DataResponse} | |
import exceptions.ServiceException | |
/** | |
* User: jakobdobrzynski | |
* Date: 11/4/13 |
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
/** list to commaseparated string */ | |
val test = firstRow match { | |
case xs if xs.size == 0 || xs.size == 1 => xs.mkString | |
case xs if xs.size > 1 => xs.mkString(", ") | |
} | |
/** commaseparated string to distinct array */ | |
.split(",").flatMap(maybeInt => |
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
#! /bin/sh | |
#decription: Starts play app using daemon | |
# 1. Go to $APPLICATION_PATH and prepare for dev by doing: play clean compile stage | |
# This will create a start script at target/start | |
# 2. Start the application by running this script | |
# created by: Jakob Dobrzynski | |
# some corrections by mdk | |
PLAY_HOME=/usr/share/play | |
PLAY=$PLAY_HOME/play |
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
1. Key | |
Download key. | |
Move to ./ssh | |
Make visible for ssh sudo chmod 400 ../.ssh/reco-keypair.pem | |
2. Connect to instance | |
ssh -i ../.ssh/reco-keypair.pem [email protected] | |
3. Download java 1.7 and install |
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 utils | |
import org.joda.time._ | |
import org.joda.time.format._ | |
import anorm._ | |
object AnormExtension { | |
val dateFormatGeneration: DateTimeFormatter = DateTimeFormat.forPattern("yyyyMMddHHmmssSS"); |