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 DynamoReader { | |
def typeReader[A](f: (JsObject => JsResult[A])) = new Reads[A] { | |
def reads(json: JsValue): JsResult[A] = json match { | |
case obj: JsObject => f(obj) | |
case _ => JsError(Seq(JsPath() -> Seq(ValidationError("error.expected.jsobject")))) | |
} | |
} | |
} | |
object DynamoString { |
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 com.amazonaws.auth.{AWSCredentials, AWSCredentialsProvider} | |
import com.typesafe.config.Config | |
class TypeSafeConfigAWSCredentialsProvider(config: Config) extends AWSCredentialsProvider { | |
override def getCredentials: AWSCredentials = { | |
new AWSCredentials { | |
override def getAWSAccessKeyId: String = config.getString("aws.accessKey") | |
override def getAWSSecretKey: String = config.getString("aws.secretKey") | |
} |
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 HelloWorld { | |
case class Blog(title : String, content : String) | |
def main (args: Array[String]) { | |
Console.println("Hello World, my name is Ryan Means and this is my blog.") | |
Console.println("You can read more about me @ my LinkedIn profile (see sidebar links)"); | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
$script = <<SCRIPT | |
wget -nv -P /tmp http://repo.scala-sbt.org/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.13.0/sbt.rpm | |
wget -nv -P /tmp http://downloads.typesafe.com/play/2.2.0/play-2.2.0.zip |