Skip to content

Instantly share code, notes, and snippets.

//E 3.3.4
def init[A](l: List[A]): List[A] = {
l match {
case Nil => Nil
case Cons(x,Nil) => Nil
case Cons(x,xs) => Cons(x,init(xs))
}
}
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.webapp.WebAppContext
import org.eclipse.jetty.server.nio._
object RunWebApp extends App {
val server = new Server
val scc = new SelectChannelConnector
scc.setPort(8080)
server.setConnectors(Array(scc))

Keybase proof

I hereby claim:

  • I am tomasherman on github.
  • I am tomasherman (https://keybase.io/tomasherman) on keybase.
  • I have a public key whose fingerprint is F834 1B85 DD5D DFAC 1758 9DB7 A3A9 2C3D BA75 C23F

To claim this, I am signing this object:

ORDER {'status': 'New', 'clientOrderId': 'f3a8a55f-9bb2-4743-bcc8-3332ee6ecc3e', 'origClientOrderId': '<null>', 'lastPrice': 'Optional.empty', 'totalQuantity': '1', 'instrument': 'cme_M6EM5', 'side': 'Buy'}
ER {'clientOrderId': 'f3a8a55f-9bb2-4743-bcc8-3332ee6ecc3e', 'origClientOrderId': '<null>', 'lastPrice': 'Optional.empty', 'totalQuantity': '1', 'orderStatus': 'New', 'side': 'Buy'}
ER {'clientOrderId': 'f3a8a55f-9bb2-4743-bcc8-3332ee6ecc3e', 'origClientOrderId': '<null>', 'lastPrice': 'Optional[1.1104]', 'text': 'Fill', 'totalQuantity': '1', 'orderStatus': 'Filled', 'side': 'Buy'}
ORDER {'status': 'New', 'clientOrderId': '58f023ac-3dc0-448d-836b-562a78b8fd3c', 'origClientOrderId': '<null>', 'lastPrice': 'Optional.empty', 'totalQuantity': '1', 'instrument': 'cnx_EURUSD', 'side': 'Sell'}
ER {'clientOrderId': '58f023ac-3dc0-448d-836b-562a78b8fd3c', 'origClientOrderId': '58f023ac-3dc0-448d-836b-562a78b8fd3c', 'lastPrice': 'Optional.empty', 'totalQuantity': '1.00000', 'orderStatus': 'New', 'side': 'Sell'}
O
@tomasherman
tomasherman / keybase.md
Created August 28, 2018 12:44
keybase.md

Keybase proof

I hereby claim:

  • I am tomasherman on github.
  • I am tomasherman (https://keybase.io/tomasherman) on keybase.
  • I have a public key ASDEgOsqfuKc4jt87CJNjRgLtYWlabUCILVrMCaGNDRgMwo

To claim this, I am signing this object:

@tomasherman
tomasherman / run.scala
Last active November 19, 2018 16:25
paralellism cats
import java.util.concurrent.Executors
import cats.effect.{Effect, IO}
import monix.eval.Task
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.language.{higherKinds, postfixOps}
object Paralellism extends App {
@tomasherman
tomasherman / keybase.md
Last active January 20, 2021 10:59
keybase.md

Keybase proof

I hereby claim:

  • I am tomasherman on github.
  • I am tomasherman (https://keybase.io/tomasherman) on keybase.
  • I have a public key ASAZyziR-Ex8X0kdHztFnDjYBIDJJR5Foi0j-njqevn55wo

To claim this, I am signing this object: