Skip to content

Instantly share code, notes, and snippets.

View sdb's full-sized avatar

Stefan De Boey sdb

  • Ellefant
  • Antwerp, Belgium
View GitHub Profile

Bitcoin Contributions 2017

@sdb
sdb / app.coffee
Created June 11, 2012 15:48
brunch + chaplin + express
server = require("./server")
server.startServer 3333, "public"
@sdb
sdb / .gitignore
Created April 29, 2012 16:03
Simple debugging SMTP server with Node.js
node_modules
@sdb
sdb / build.sbt
Created October 24, 2011 19:16
Sample configuration for xsbt-filter
import FilterKeys._
seq(filterSettings: _*)
filterDirectoryName := "my-filters"
includeFilter in filters := AllPassFilter -- HiddenFileFilter
includeFilter in filterResources ~= { f => f || ("*.props" | "*.conf") }
@sdb
sdb / 1.md
Created July 16, 2011 16:54
Render class diagram with Graphviz

This example models a class diagram with Scuml and then uses Graphviz to render the class diagram.

@sdb
sdb / ril2ip.py
Created March 11, 2011 23:09
copy bookmarks from Read It Later to Instapaper
#! /usr/bin/env python
"""
Script to copy all bookmarks from Read It Later to Instapaper.
See also http://readitlaterlist.com/api/docs/#get
and http://www.instapaper.com/api/simple
"""
import urllib, urllib2, json
@sdb
sdb / GlassFish.scala
Created March 7, 2011 23:38
create an SBT plug-in for running webapps in Glassfish
package sbt {
import org.glassfish.embeddable.{GlassFish, GlassFishRuntime, GlassFishProperties, Deployer}
trait GlassFishPlugin extends BasicWebScalaProject {
def glassFishPort = GlassFishRunner.DefaultPort
private lazy val glassFish = new GlassFishRunner(glassFishPort, temporaryWarPath)
lazy val glassfishRun = glassfishRunAction
@sdb
sdb / Project.scala
Created October 13, 2010 15:32
liquibase-sbt-plugin configuration example
import sbt._
import com.github.sdb.sbt.liquibase._
class TestProject(info: ProjectInfo) extends DefaultProject(info) with LiquibasePlugin {
// declare the required database driver as a runtime dependency
val h2 = "com.h2database" % "h2" % "1.2.143" % "runtime"
// fetch the running mode from the system properties (dev, prd, ...)
lazy val mode = system[String]("mode").get.getOrElse(null)
@sdb
sdb / backwards-talk-1.scala
Created September 6, 2010 10:22
Scala solutions for the Coding Kata programming exercises
package org.codingkata.unit;
import _root_.org.codingkata.unit.api.BaseKataSolution;
class MyKata extends BaseKataSolution {
/**
* Revert a word in 'backward talk' to understand it
*
* @param word the backwards word
@sdb
sdb / Factory.scala
Created August 26, 2010 22:45
Factory pattern in Scala
abstract class Vehicle(val color: String) {
def price = 100 * factor
def factor: Double
}
class Car(override val color: String) extends Vehicle(color) {
val factor = 1.0
}
class Van(override val color: String) extends Vehicle(color) {