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
//EXAMPLE evolution.scala | |
import java.io.{File, FilenameFilter} | |
import com.datastax.driver.core.Session | |
import org.apache.commons.io.filefilter.SuffixFileFilter | |
import org.joda.time.{DateTime, DateTimeZone} | |
import play.api.Play.current | |
import play.api.{Logger, 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
#!/usr/bin/env bash | |
### ------------------------------- ### | |
### Helper methods for BASH scripts ### | |
### ------------------------------- ### | |
die() { | |
echo "$@" 1>&2 | |
exit 1 | |
} |
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 PeepsCanValidateMe { | |
def validateMe() : Seq[ValidationError] | |
} |
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 BuildableCaseClass[T] { | |
def build(input: Seq[String]) : Either[T, Seq[ValidationError]] | |
} |
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 org.joda.time.DateTime | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.{Await, ExecutionContext, Future} | |
import scala.concurrent.duration._ | |
object FooBar { |
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
// this works in play 2.4 with the 1.9.29 version of async http client | |
def securePostMultipart(requestPath: String, etsyToken: RequestToken, | |
fileName: String, file: File, fileMimeType: String, | |
stringParts: (String, String)*): Future[WSResponse] = { | |
val fullUrl = "http://foo/bar/zar" | |
val parts : List[Part] = List( | |
new FilePart(fileName, file, fileMimeType), |
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
2015-09-21 14:20:49,177 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-4 | |
Cluster Node [akka.tcp://[email protected]:9010] - Starting up... | |
2015-09-21 14:20:49,503 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-2 | |
Cluster Node [akka.tcp://[email protected]:9010] - Registered cluster JMX MBean [akka:type=Cluster] | |
2015-09-21 14:20:49,504 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-2 | |
Cluster Node [akka.tcp://[email protected]:9010] - Started up successfully | |
2015-09-21 14:20:49,541 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-2 |
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
2015-09-21 14:20:50,483 - [INFO] - from MySystem(akka://EsaleSystem) in EsaleSystem-akka.actor.default-dispatcher-7 | |
MySystem Node [akka.tcp://[email protected]:9010] - Starting up... | |
2015-09-21 14:20:50,874 - [INFO] - from MySystem(akka://MySystem) in MySystem-akka.actor.default-dispatcher-6 | |
MySystem Node [akka.tcp://[email protected]:9010] - Registered MySystem JMX MBean [akka:type=MySystem] | |
2015-09-21 14:20:50,879 - [INFO] - from MySystem(akka://MySystem) in MySystem-akka.actor.default-dispatcher-6 | |
MySystem Node [akka.tcp://[email protected]:9010] - Started up successfully | |
2015-09-21 14:20:50,914 - [INFO] - from MySystem(akka://MySystem) in MySystem-akka.actor.default-dispatcher-4 |
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
2015-09-21 14:20:54,334 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-2 | |
Cluster Node [akka.tcp://[email protected]:9010] - Starting up... | |
015-09-21 14:20:55,015 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-15 | |
Cluster Node [akka.tcp://[email protected]:9010] - Registered cluster JMX MBean [akka:type=Cluster] | |
2015-09-21 14:20:55,018 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-15 | |
Cluster Node [akka.tcp://[email protected]:9010] - Started up successfully | |
2015-09-21 14:20:55,093 - [INFO] - from Cluster(akka://MySystem) in MySystem-akka.actor.default-dispatcher-15 |
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
create table website_hits( | |
full_url TEXT, | |
hit_date TIMESTAMP, | |
website_hit_id UUID, | |
PRIMARY KEY(full_url, hit_date, website_hit_id ) | |
) WITH CLUSTERING ORDER BY (hit_date DESC); | |
insert into website_hits(full_url, hit_date, website_hit_id) values('www.foo.com', dateof(now()), uuid()); | |
insert into website_hits(full_url, hit_date, website_hit_id) values('www.bar.com', dateof(now()), uuid()); |
OlderNewer