I hereby claim:
- I am jroper on github.
- I am jroper (https://keybase.io/jroper) on keybase.
- I have a public key ASDmToLnfJ0iYnejVzX5FIoZNvTJi_A9SX3kF12i-1pbwgo
To claim this, I am signing this object:
| class BlogRouter(controller: BlogController) extends SimpleRouter { | |
| object ? { def unapply[A](a: A) = Some(a, a) } | |
| def routes = { | |
| // Index | |
| case GET(p"/" | p"") ? Page(page) => controller.index(page) | |
| // View single blog post | |
| case GET(p"/${int(year)}<\d{4}>/${int(month)}<\d{2}>/${int(day)}<\d{2}>/$permalink.html") => |
| // In the path string: | |
| case GET(p"/foo?param1=${param1}¶m2=${param2}") | |
| // Problems: doesn't support extracting lists of parameters or optional parameters | |
| // Using ? and & extractors to combine multiple string interpolated query string parameters: | |
| case GET(p"/foo" ? q"required=${required}" & q?"optional=${optional}" & q*"many=${many}") | |
| // I think I like this one, q extracts String, q? extracts Option[String], q* extracts List[String] | |
| // One question, how strict should we make it? |
| import scalaz.Reader | |
| case class User(id: Int, name: String) | |
| case class Interest(name: String) | |
| trait Database | |
| trait Attempt1 { | |
| // How every explanation of Reader monad I've seen/read goes: |
| // TEST 1: | |
| // Without scrolling down, can you work out whether bar() is the return value, or a side effecting | |
| // method call? | |
| def test1(): Boolean = { | |
| if (foo) { | |
| bar() | |
| } else { | |
| /* | |
| It is a truth universally acknowledged, that a single man in possession | |
| of a good fortune, must be in want of a wife. |
| import akka.stream._ | |
| import akka.stream.scaladsl.{BroadcastHub, Flow, Keep, MergeHub, Sink, Source} | |
| import akka.stream.stage.{GraphStageLogic, GraphStageWithMaterializedValue, InHandler, OutHandler} | |
| import scala.collection.concurrent.TrieMap | |
| sealed trait ChatEvent { | |
| def room: String | |
| } | |
| case class ChatMessage(user: String, room: String, message: String) extends ChatEvent |
| package streams.utils | |
| import java.util.concurrent.ThreadLocalRandom | |
| import akka.NotUsed | |
| import akka.stream._ | |
| import akka.stream.scaladsl.Source | |
| import akka.stream.stage._ | |
| import scala.concurrent.duration._ |
| package streams.utils | |
| import akka.NotUsed | |
| import akka.stream._ | |
| import akka.stream.scaladsl.{BroadcastHub, Keep, RunnableGraph, Source} | |
| import akka.stream.stage._ | |
| import scala.concurrent.duration.{Duration, FiniteDuration} | |
| /** |
| import play.sbt.PlayRunHook | |
| import sbt._ | |
| import java.net.InetSocketAddress | |
| object Angular2 { | |
| def apply(log: Logger, base: File, target: File): PlayRunHook = { | |
| object Angular2Process extends PlayRunHook { | |
| private var watchProcess: Option[Process] = None |
I hereby claim:
To claim this, I am signing this object:
| // ==UserScript== | |
| // @name CUA WAC password field enabler | |
| // @namespace https://jazzy.id.au | |
| // @version 0.1 | |
| // @description Enable the WAC password field so that a password manager can fill it. | |
| // @author James Roper | |
| // @match https://ob.cua.com.au/ib/*/*Login*.action | |
| // @grant none | |
| // ==/UserScript== |