Skip to content

Instantly share code, notes, and snippets.

// This should work with Scala 2.10.4 & scalaz 7.1, core, effect and concurrent packages
import scalaz.{ concurrent, Free, Functor, Monad, syntax }
import concurrent.Task
import Free.{freeMonad => _, _}
import syntax.monad._
// Describe the set of actions - which are functors
sealed trait RedisF[+A] {
def map[B](fn: A => B): RedisF[B]
/**
* A monad to abstract dependencies in the code, see https://coderwall.com/p/kh_z5g
*/
object Reader {
/**
* an implicit to convert a function A => B in a Reader[A, B]
*/
implicit def reader[C, R](block: C => R): Reader[C, R] = Reader(block)
import mesosphere.mesos.util.FrameworkInfo
import org.apache.mesos.MesosSchedulerDriver
/**
* @author Tobi Knaup
*/
object Main extends App {

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

package core.dao
import scala.concurrent.Future
import play.api.Logger
import reactivemongo.core.commands.LastError
import reactivemongo.core.errors.DatabaseException
import core.db.MongoHelper