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
[ERROR] [12/04/2012 15:49:02.611] [specs2.DefaultExecutionStrategy1] [akka://default/user/$$a] None.get | |
java.util.NoSuchElementException: None.get | |
at scala.None$.get(Option.scala:313) | |
at scala.None$.get(Option.scala:311) | |
at org.cakesolutions.akkapatterns.domain.Configured$class.configured(configuration.scala:26) | |
at org.cakesolutions.akkapatterns.core.application.CustomerActor.configured(customer.scala:53) | |
at org.cakesolutions.akkapatterns.core.application.MongoCollections$class.customers(application.scala:45) | |
at org.cakesolutions.akkapatterns.core.application.CustomerActor.customers(customer.scala:53) | |
at org.cakesolutions.akkapatterns.core.application.CustomerOperations$class.getCustomer(customer.scala:37) | |
at org.cakesolutions.akkapatterns.core.application.CustomerActor.getCustomer(customer.scala:53) |
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
[ERROR] [12/05/2012 13:29:11.490] [default-akka.actor.default-dispatcher-3] [LocalActorRefProvider(akka://default)] guardian failed, shutting down system | |
java.lang.StackOverflowError | |
at scala.collection.convert.Wrappers$IteratorWrapper.<init>(Wrappers.scala:28) | |
at scala.collection.convert.Wrappers$IterableWrapperTrait$class.iterator(Wrappers.scala:24) | |
at scala.collection.convert.Wrappers$SeqWrapper.iterator(Wrappers.scala:64) | |
at scala.collection.convert.Wrappers$SeqWrapper.iterator(Wrappers.scala:64) | |
at org.bson.BasicBSONEncoder.putIterable(BasicBSONEncoder.java:294) | |
at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:234) | |
at org.bson.BasicBSONEncoder.putIterable(BasicBSONEncoder.java:295) | |
at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:234) |
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
implicit object CustomerSerializer extends CasbahSerializer[Customer] { | |
def apply(customer: Customer) = { | |
val builder = MongoDBObject.newBuilder | |
System.out.println("CustomerSerializer:::" + customer) | |
builder += "firstName" -> customer.firstName | |
builder += "lastName" -> customer.lastName | |
builder += "email" -> customer.email | |
builder += "addresses" -> customer.addresses.map(AddressSerializer(_)) | |
builder += "id" -> customer.id |
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 com.example.core.application | |
import com.mongodb.casbah.Imports._ | |
import java.util.UUID | |
import com.example.domain.{User, Address, Customer} | |
/** | |
* Contains type classes that deserialize records from Casbah into "our" types. | |
*/ | |
trait CasbahDeserializers { |
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
var Post = function(db) { | |
this.db = db; | |
}; | |
Post.prototype.get = function(req, res) { | |
var id = req.params.id; | |
var org = req.params.org; | |
var db = this.db; | |
console.log('Retrieving post: ' + id + ' from org: ' + org); |
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
orgSchema.path('timezone').validate(function(value) { | |
Timezone.findOne({_id: value}, "_id", function (err, timezone) { return false; }); | |
}, "Please provide a valid timezone"); |
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
$ curl -i --data "[email protected]&password=password" http://localhost:3000/login | |
HTTP/1.1 200 OK | |
X-Powered-By: Express | |
Content-Type: application/json; charset=utf-8 | |
Content-Length: 260 | |
Set-Cookie: connect.sid=s%3A9b4c4dMSkSiSEex%2BOgtsXBsu.BUoXyrHk95nvhAfDY3mkOIuk0I8npOhdAzMCc4WHnsA; Path=/; HttpOnly | |
Date: Tue, 22 Jan 2013 03:32:13 GMT | |
Connection: keep-alive | |
{ |
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
$ brew list | |
autoconf automake libtool mongodb node readline | |
$ brew install luarocks | |
==> Installing luarocks dependency: lua | |
==> Downloading http://www.lua.org/ftp/lua-5.1.5.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/lua-5.1.5.tar.gz | |
==> Patching | |
patching file Makefile |
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
init_config: | |
instances: | |
- host: localhost | |
sock: /tmp/redis.sock | |
password: | |
tags: | |
- optional_tag1 | |
- optional_tag2 |
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
FROM switzer/redis | |
MAINTAINER Scott Switzer <[email protected]> | |
RUN cp /usr/src/redis-$REDIS_VERSION/redis.conf /etc | |
RUN sed -i "s/port 6379/port 0/" /etc/redis.conf;\ | |
sed -i "s/# unixsocket \/tmp\/redis.sock/unixsocket \/tmp\/redis.sock/" /etc/redis.conf;\ | |
sed -i "s/# unixsocketperm 755/unixsocketperm 777/" /etc/redis.conf;\ | |
sed -i "s/# slaveof <masterip> <masterport>/slaveof admin-cache.internal.sunblock.io 6379/" /etc/redis.conf |
OlderNewer