Skip to content

Instantly share code, notes, and snippets.

View cb372's full-sized avatar

Chris Birchall cb372

View GitHub Profile
@cb372
cb372 / Attempts.scala
Last active August 29, 2015 14:22 — forked from jroper/Attempts.scala
import scalaz.Reader
case class User(id: Int, name: String)
case class Interest(name: String)
trait Database
trait Attempt1 {
// How every explanation of Reader monad I've seen/read goes:
@cb372
cb372 / ApacheCommonExec.java
Created March 28, 2012 07:37 — forked from sakamotodesu/ApacheCommonExec.java
apache commons exec "write end dead" sample
package com.test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.DefaultExecuteResultHandler;
import org.apache.commons.exec.DefaultExecutor;