Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dozed
dozed / doge.scala
Last active March 6, 2016 18:35 — forked from vito-c/doge.scala
much case very none
class Knocker extends Actor with ActorLogging {
import scala.concurrent.ExecutionContext.Implicits.global
def receive: Receive = {
case imsg:IMessage =>
for {
knock <- KnockKnock(imsg)
nick <- knock.target
} yield {
V2D2.nickMap onSuccess {
case nm =>
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWKIzx+Z/9hvxex7gqoOfdxPsoz3tV9nq/kvJVN4v61eekGDTW2m5U/ufD01btEzoFA2M83qBOCzADeo3Tvj+yOTlnDPnnJBFVNcI67LskRNxzsF/5U3TxF1cII5zHg89F8kzb7+5+6FUNs6mIMImNux1TJfzVoK0FfKhhRhb6c5x/0HcIFswxv/nSeJfuSz6Nr3D4lHd0ZDMJjIwq4RM9+U2b5wZAJ5Qy2sQgw2NNP0xVZhbGcN2irYojiXf9uqqAUeDTjo5TxTP6hW8y/3FuFzbzlyEIf8aRtUlRcPgo8zVikJH6i6hHqiTzYpbHTB5F5w0GjVTYFak8bJF6hqC/ stefan@helix
package foo
import java.io.{PrintWriter, StringWriter}
import org.fusesource.scalate.{TemplateEngine, DefaultRenderContext}
class SimpleTemplateEngine(templateSource: String) {
val templateEngine = new TemplateEngine()
package foo
import java.io.{PrintWriter, StringWriter}
import org.fusesource.scalate.{TemplateEngine, DefaultRenderContext}
class SimpleTemplateEngine(templateSource: String) {
val templateEngine = new TemplateEngine()
// this is the macro expansion
RescopingMacros.transplant({
class X extends scala.AnyRef {
def <init>(): X = {
X.super.<init>();
()
};
private[this] val request: Int = 1;
<stable> <accessor> def request: Int = X.this.request;
import scala.language.experimental.macros
object implicit_dsls extends App {
trait DSLImpl {
def getImpl(route: String)(action: => Any): Unit
}
See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.lang.ExceptionInInitializerError
at org.eclipse.jetty.servlet.ServletContextHandler.newSessionHandler(ServletContextHandler.java:241)
at org.eclipse.jetty.servlet.ServletContextHandler.getSessionHandler(ServletContextHandler.java:334)
at org.eclipse.jetty.servlet.ServletContextHandler.relinkHandlers(ServletContextHandler.java:180)
at org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:157)

Initial Data Setup

CREATE (f:Foo { id: "IT8faLFf9AU" })
FOREACH (r in range(0,100) | CREATE (f)-[:r1]->(b:Bar), (f)-[:r2]->(b:Bar), (f)-[:r3]->(b:Bar));