Skip to content

Instantly share code, notes, and snippets.

Pierre Andrews Mortimerp9

Block or report user

Report or block Mortimerp9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Mortimerp9 / TimeTable.scala
Created Jan 30, 2014
Store twitter Time in Slick 2 tables.
View TimeTable.scala
import scala.slick.driver....simple._
import com.twitter.util.Time
class TimeTable(tag: Tag) extends Table[(Int, Time)](tag, "timetable") {
implicit val twitterTimeMap = MappedColumnType.base[Time, Long](
{ time => time.inMillis },
{ millis => Time.fromMilliseconds(millis) }
Mortimerp9 / HelloAkka.scala
Created Jan 31, 2014
TypedActorRef for akka using unboxed tagged types. This does not type the messages, it only allows you to require a particular type of actor when taking `ActorRef` as parameter. This is useful when you are passing actors reference around and you are sure of the implementation type of this actor. It makes reading complex Akka code a bit easier, b…
View HelloAkka.scala
//Hello world from
import TypedActorRef._
import{ActorRef, ActorSystem, Props, Actor}
import akka.pattern.ask
import akka.util.Timeout
import scala.concurrent.duration._
val system = ActorSystem("helloakka")
Mortimerp9 / gist:9097361
Created Feb 19, 2014
(_<o.O) java cat.
View gist:9097361
public class Bar {
class O {
int O = 0;
int _ = 10;
O o = new O();
Boolean foo = (_<o.O);

Keybase proof

I hereby claim:

  • I am Mortimerp9 on github.
  • I am mortimer ( on keybase.
  • I have a public key whose fingerprint is 67A4 6F85 0705 0682 E304 956F B74C 491C 79F0 062D

To claim this, I am signing this object:

View gist:78d8194bc2c808908ddc
import com.quantifind.sumac.{FieldArgs, ArgMain}
class RangeArgs extends FieldArgs {
var from: Int = 0
var to: Option[Int] = None
var file: File = _
class FileRange extends ArgMain[RangeArgs] {
def main(args: RangeArgs) {
val lines =
View gist:708a7947098cc3fd0eb1
trait SQLArgs extends FieldArgs {
var url: String = _
var driver: String = _
var user: String = _
var password: String = _
View gist:412b07ff450bca4c80df
trait EnvArgs extends FieldArgs {
var env = _
View gist:70e2d3114193a3179c3e
class MyArgs extends EnvArgs with SQLArgs {
//add extra app args here...
View gist:fd1594415379a8f446c5
class MyArgs {
var db1: SQLArgs = new SQLArgs {}
var db2: SQLArgs = new SQLArgs {}
View gist:f162a638a82e953034b4
import com.quantifind.sumac.FieldArgs
class HelloArgs extends FieldArgs {
var message: String = "world"
You can’t perform that action at this time.