Skip to content

Instantly share code, notes, and snippets.

View btd's full-sized avatar

Denis Bardadym btd

  • AWS
  • Deutschland, München
View GitHub Profile
@btd
btd / fib.scala
Created October 16, 2011 14:16
One line fib numbers without recursion and scala.math
val fib = (n:Int) => (0 until n).foldLeft(0, 1) { (x, i) => (x._2, x._1 + x._2) }._1
@j-mcnally
j-mcnally / Readme
Created August 18, 2011 22:04
Express: Switch cookie sessions to a header session fore Node Apps built as APIs
The two files attached are Express Middleware
Srvformat sets the format based on the accept header
to switch it to api mode.
ApiSession uses the req.format set by this to decide
which kinds of sessions to use.