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
| package pc | |
| import akka.actor.Actor | |
| import akka.actor.Props | |
| import akka.actor.ActorRef | |
| import akka.actor.ActorRefFactory | |
| class Parent extends Actor { | |
| val child = context.actorOf(Props[Child], "child") | |
| var ponged = false |
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
| organization := "net.seratch" | |
| name := "sandbox" | |
| version := "0.1" | |
| scalaVersion := "2.9.1" | |
| libraryDependencies ++= Seq( | |
| "junit" % "junit" % "4.9" withSources(), |
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
| #!/usr/bin/env node | |
| var amqp = require('amqplib'); | |
| var exchange_name = 'pubsub'; | |
| amqp.connect('amqp://localhost').then(function(conn) { | |
| process.once('SIGINT', function() { conn.close(); }); | |
| return conn.createChannel().then(function(channel) { |
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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://npmjs.org/install.sh | sh |
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
| cd ~ | |
| sudo yum update | |
| sudo yum install java-1.7.0-openjdk.i686 -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
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
| config = new BaseConfiguration() | |
| storage = config.subset("storage") | |
| storage.setProperty("backend", "inmemory") | |
| index = storage.subset("index").subset("search") | |
| index.setProperty("backend", "elasticsearch") | |
| index.setProperty("local-mode", true) | |
| index.setProperty("client-only", false) | |
| index.setProperty("directory", "/tmp/titan/es") |
NewerOlder