This file contains 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 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 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 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 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/ |
This file contains 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 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
case class Employee(id: Int, firstName: String, lastName: String) | |
object Employee { | |
// Note that because `Ordering[A]` is not contravariant, the declaration | |
// must be type-parametrized in the event that you want the implicit | |
// ordering to apply to subclasses of `Employee`. | |
implicit def orderingByName[A <: Employee]: Ordering[A] = | |
Ordering.by(e => (e.lastName, e.firstName)) | |
val orderingById: Ordering[Employee] = Ordering.by(e => e.id) |
This file contains 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
trait Irrelevant {} | |
trait Base { | |
def text: String = "Base" | |
def enter: () => Any = | |
() => { | |
println("enter: Some logic") | |
} |
This file contains 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
// Jupyter Scala kernel magic | |
classpath.add("org.json4s" % "json4s-native_2.11" % "3.4.0") | |
import org.json4s._ | |
import org.json4s.native.Serialization | |
implicit val formats = Serialization.formats(NoTypeHints) | |
case class Subject(article: String, page: Int) | |
case class Speaker(name: String, age: Int, subject: Subject) | |
val speaker = Speaker("John Doe", 45, Subject("Doing It Yourself", 200)) |
This file contains 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
Section "ServerLayout" | |
Identifier "aticonfig Layout" | |
Screen 0 "aticonfig-Screen[0]-0" 0 0 | |
EndSection | |
Section "Files" | |
EndSection | |
Section "Module" | |
EndSection |