Skip to content

Instantly share code, notes, and snippets.

trait WithContext {
var ctx = null
def setContext(c:Context): Unit = if (ctx == null) {
ctx = c
} else {
sys.error("already set")
}
def fromContext[T](k:String):T = if (ctx == null) {
sys.error("premature access")
} else {
@ymasory
ymasory / RetroLogger.scala
Created September 16, 2011 05:14 — forked from gseitz/RetroLogger.scala
RetroLogger - Bringing old school log level commands to sbt-0.10.x
/* RetroLogger.scala
*
* A handy sbt-0.10.x plugin that allows you to set the log level like in the
* old days (AKA sbt-0.7.x).
*
* It works by creating aliases of this form:
* "set logLevel := Level.Debug" ====> "debug"
*
* Installation:
* - mkdir -p ~/.sbt/plugins/
@ymasory
ymasory / scala-irc-people.md
Created June 20, 2011 01:05 — forked from SethTisue/scala-irc-people.md
Who's Who on #scala

who's who on #scala

in ascending order of how easy they are to guess

additions/corrections welcome

Very Hard