Skip to content

Instantly share code, notes, and snippets.

View andrelaszlo's full-sized avatar
🤓

André Laszlo andrelaszlo

🤓
View GitHub Profile
@andrelaszlo
andrelaszlo / gist:2044696
Created March 15, 2012 15:07
haskell-mode
; haskell mode
(load "~/elisp/haskell-mode-2.8.0/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;These tree indentation modes are mutually exclusive
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
@andrelaszlo
andrelaszlo / logo.png
Created September 4, 2011 21:27
Control the alsa volume (up/down/mute/set to x%) from the command line or in scripts
logo.png
@andrelaszlo
andrelaszlo / PitTree.scala
Created October 28, 2009 22:41 — forked from AlexanderWingard/PitTree.scala
Added the new pretty toString method
class PitTree[T](val children : Map[String, PitTree[T]], val value : Option[T]) extends Map[String, T] {
def this() = this(Map(), None)
def this(value : T) = this(Map(), Some(value))
def update(path : String, upVal : T) : PitTree[T] = update(splitPath(path), upVal)
def update(path : List[String], upVal : T) : PitTree[T] = path match {
case Nil =>
new PitTree[T](upVal)
case h :: t =>
val child = children.getOrElse(h, new PitTree[T]()).update(t, upVal)
new PitTree[T](children + (h -> child), value)