Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
import play.api.libs.ws.Response | |
import scala.concurrent.{Future, Promise} | |
import com.ning.http.client._ | |
import com.ning.http.client.{Response => AHCResponse} | |
import com.ning.http.client.AsyncCompletionHandler | |
val url = "http://google.com" | |
val config = new AsyncHttpClientConfig.Builder() |
class DeadLetterLogger extends Actor with ActorLogging { | |
def receive = { | |
case DeadLetter(message, sender, recipient) => | |
log.info("DeadLetter message {}", message) | |
} | |
} | |
val deadLetterLogger = system.actorOf(Props(classOf[DeadLetterLogger])) | |
system.eventStream.subscribe(deadLetterLogger, classOf[DeadLetter]) |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
Setup vagrant vm
vagrant box add precise64 http://files.vagrantup.com/precise64.box
vagrant init precise64
sed -i '.bak' 's/# config.vm.network :private_network/config.vm.network :private_network/' Vagrantfile
vagrant up
vagrant ssh
Install base software and apache (to have something to proxy)
So, there have been some discussions and angry tweets recently about irritating Scala "features" (like value discarding and auto-tupling) that can actually be turned off by selecting the right compiler flag in conjunction with -Xfatal-warnings
. I highly recommend a set of options something like those below.
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8", // yes, this is 2 args
"-feature",
"-language:existentials",
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
REMOTE=play@SERVER_IP | |
REMOTE_APP=/home/play/PROJECT_NAME/ | |
sbt stage || exit 1; | |
ssh $REMOTE "cd $REMOTE_APP; ./stop.sh"; | |
rsync -va target/ $REMOTE:$REMOTE_APP/target | |
ssh $REMOTE "cd $REMOTE_APP; ./start.sh"; |
#!/bin/bash | |
export PW=`pwgen -Bs 10 1` | |
echo "$PW" > password | |
# Create a self signed certificate & private key to create a root certificate authority. | |
keytool -genkeypair -v \ | |
-alias clientCA \ | |
-keystore client.jks \ |
#!/bin/bash | |
export PW=`cat password` | |
# Create a self signed key pair root CA certificate. | |
keytool -genkeypair -v \ | |
-alias exampleca \ | |
-dname "CN=exampleCA, OU=Example Org, O=Example Company, L=San Francisco, ST=California, C=US" \ | |
-keystore exampleca.jks \ | |
-keypass:env PW \ |
#!/bin/bash | |
export PW=`cat password` | |
# Create a JKS keystore that trusts the example CA, with the default password. | |
# This is used by the client. | |
keytool -import -v \ | |
-alias exampleca \ | |
-file exampleca.crt \ | |
-keypass:env PW \ |