This file contains hidden or 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
| object RichText { | |
| val GTDmatch = """GTD[(][0-9A-Za-z\-]+[)]""".r | |
| val NORMAL = """NORMAL[(][0-9]+[)]""".r | |
| val SYNTHETIC_STOP_LIMIT = """SYNTHETIC_STOP_LIMIT[(][0-9]+,[0-9]+[)]""".r | |
| val SYNTHETIC_STOP = """SYNTHETIC_STOP[(][0-9]+[)]""".r | |
| val SYNTHETIC_MARKET_IF_TOUCHED = """SYNTHETIC_MARKET_IF_TOUCHED[(][0-9]+[)]""".r | |
| val NATIVE_STOP_WITH_PROTECTION = """NATIVE_STOP_WITH_PROTECTION[(][0-9]+[)]""".r | |
| val NATIVE_STOP_LIMIT = """NATIVE_STOP_LIMIT[(][0-9]+,[0-9]+[)]""".r | |
| } |
This file contains hidden or 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 java.io._ | |
| val osURL: PartialFunction[Option[String], OutputStream] = { | |
| case Some(name) => new java.io.FileOutputStream(new java.io.File(name)) | |
| if(name.contains(":")) | |
| } | |
| val osLocalFile: PartialFunction[Option[String], OutputStream] = { | |
| case Some(name) => new java.io.FileOutputStream(new java.io.File(name)) | |
| } |
This file contains hidden or 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 | |
| #-*- mode: scala; -*- | |
| ##### | |
| ##### NOTE: save this script WITHOUT EXTENSION onto the file system. | |
| ##### | |
| launcher=$(which sbt-launch.jar) | |
| if [ -z "$launcher" ] ;then | |
| pushd /tmp |
This file contains hidden or 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 net.jcip.annotations.NotThreadSafe | |
| import org.cache2k.impl.ClockProPlusCache | |
| type ImageType = Array[Byte] | |
| class CacheSource(dir: java.io.File) | |
| extends org.cache2k.CacheSource[String, ImageType] { | |
| import java.nio.file.Files | |
| import javax.imageio.ImageIO |
This file contains hidden or 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
| # Exclude folders | |
| target | |
| # Eclipse | |
| .classpath/ | |
| .project/ | |
| .settings/ | |
| .externalToolBuilders/ | |
| *.launch | |
| .target |
This file contains hidden or 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
| syntax: glob | |
| # General files and folders | |
| tmp/ | |
| target/ | |
| target_sbt/ | |
| .cache/ | |
| .history | |
| # Eclipse |
This file contains hidden or 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
| (require 'package) ;; You might already have this line | |
| (add-to-list 'package-archives | |
| '("melpa" . "https://melpa.org/packages/")) | |
| (when (< emacs-major-version 24) | |
| ;; For important compatibility libraries like cl-lib | |
| (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) | |
| (package-initialize) | |
| (global-set-key "\C-cd" 'zeal-at-point) | |
| ;(add-to-list 'zeal-at-point-mode-alist '(rust-mode . "rust")) |
This file contains hidden or 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
| /** This is a marker trait intended to provide independence of FIX version. */ | |
| trait SecurityListLike extends quickfix.Message | |
| object SecurityListLike { | |
| implicit def mixin(o: Mixin) = o.o | |
| def ::(o: quickfix.Message) = new Mixin(o) | |
| final class Mixin private[SecurityListLike](val o: quickfix.Message) extends SecurityListLike { | |
| import quickfix.field.MsgType | |
| require(o.getHeader.getString(MsgType.FIELD) == MsgType.SECURITY_LIST) | |
| } |
This file contains hidden or 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 example.statemachine | |
| import scalaz.{State, Scalaz}, Scalaz._ | |
| object FSM { | |
| def apply[I, S](f: PartialFunction[(I, S), S]): FSM[I, S] = | |
| new FSM((i, s) => f.applyOrElse((i, s), (_: (I, S)) => s)) | |
| private def states[S, O](xs: List[State[S, O]]): State[S, List[O]] = | |
| xs.sequence[({type λ[α]=State[S, α]})#λ, O] |
This file contains hidden or 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
| #/etc/apt/sources.list.d/jitsi.list | |
| # $ wget -qO - https://download.jitsi.org/nightly/deb/unstable/archive.key | sudo apt-key add - | |
| deb http://download.jitsi.org/deb unstable/ |