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.pastebo.web.auth; | |
import com.google.inject.Inject; | |
import com.google.inject.Singleton; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; |
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.pastebo.web.auth; | |
import com.google.common.base.Preconditions; | |
import com.google.inject.Key; | |
import com.google.inject.OutOfScopeException; | |
import com.google.inject.Provider; | |
import com.google.inject.Scope; | |
/** | |
* Special simulated proxy session scope for use with UserSession objects ONLY! |
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 com.google.common.collect.ImmutableMap; | |
import com.google.common.collect.MapMaker; | |
import com.google.inject.Inject; | |
import com.google.inject.Singleton; | |
import com.mongodb.BasicDBList; | |
import com.mongodb.BasicDBObject; | |
import com.mongodb.DBObject; | |
import com.pastebo.data.User; | |
import com.pastebo.persist.MongoStore; |
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
#!/bin/bash /usr/local/bin/coffee | |
-# | |
-# CLU by Dhanji R. Prasanna. Cluster Manager for EC2 processes. | |
- | |
-sys = require 'util' | |
-spawn = (require 'child_process').spawn | |
- | |
- | |
-# Cell descriptor | |
-cell = |
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
@At("/person/:name") @Async | |
public class PersonService { | |
@Before | |
void pre(Request request, @Named("name") String name) { | |
System.out.println("headers were: " + request.headers()); | |
// We can either return a "Reply" here, or do nothing to continue processing | |
} |
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
@At("/person") @Async | |
public class PersonService { | |
@Before | |
void pre(Request request) { | |
System.out.println("headers were: " + request.headers()); | |
} | |
/** | |
* Callback for request body. Can return a continuation, which will |
NewerOlder