Skip to content

Instantly share code, notes, and snippets.

View DomBlack's full-sized avatar

Dominic Black DomBlack

View GitHub Profile
define(
[ 'lib/underscore', 'lib/backbone' ],
function(_, Backbone) {
"use strict";
/**
* An extension of the Backbone `off` method.
*
* This method will trigger <code>onNoObservers</code> when
* there are no more observers left.

Keybase proof

I hereby claim:

  • I am domblack on github.
  • I am domblack (https://keybase.io/domblack) on keybase.
  • I have a public key whose fingerprint is 5932 F7C5 7635 F9D4 C99E 04BF 69E2 5756 E861 0BB1

To claim this, I am signing this object:

transliterations {
# Taken from document 9309
# http://www.icao.int/publications/Documents/9303_p1_v1_cons_en.pdf
## Multinational Characters
# Page 87
"Á" = "A" # A acute 1
"À" = "A" # A grave 2
"Â" = "A" # A circumflex 3
"Ä" = "AE" # A diaeresis 4
@DomBlack
DomBlack / sbt.sh
Created July 30, 2015 13:49
SBT / Java Selection
function nextfreeport()
{
for port in $(seq $1 65000); do; (netstat -ant | grep ".$port ") > /dev/null; if [ $? -eq 1 ]; then; echo "$port" && break; fi; done
}
alias sbt7='JAVA_HOME=$(/usr/libexec/java_home -v 1.7.0) && sbt -jvm-debug $(nextfreeport 5005) -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$(nextfreeport 9010) -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=true -Djava.rmi.server.hostname=127.0.0.1'
alias sbt8='JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0) && sbt -jvm-debug $(nextfreeport 5005) -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$(nextfreeport 9010) -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=true -Djava.rmi.server.hostname=127.0.0.1'
@DomBlack
DomBlack / Flowz.scala
Created August 17, 2015 08:20
Generic Akka stream operations for carrying extra information around operations
import akka.stream.scaladsl.Flow
import scala.concurrent.{ ExecutionContext, Future }
import scalaz._
import scalaz.std.scalaFuture.futureInstance // IntelliJ lies
/**
* Flowz provides Akka Stream Flow like methods for monadic types.
*
* You can define the `M` type and the input type, and let the compiler infer the output