Skip to content

Instantly share code, notes, and snippets.

View markhibberd's full-sized avatar

markhibberd markhibberd

View GitHub Profile
@paulp
paulp / The Signs of Soundness
Last active June 17, 2021 06:48
The Signs of Soundness
Hello scala, my old friend
I've come to take you home again
Because a feature slowly creeping
left me plagued with doubts and weeping
and the version that was tagged in the repo
just has to go
it lacks the signs of soundness
On sleepless nights I hacked alone
applying ant and other tools of stone
@bradclawsie
bradclawsie / wai-sample.hs
Created April 1, 2012 05:48
complete wai/warp sample server
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.Wai
import Network.Wai.Handler.Warp
import Network.HTTP.Types
import qualified Data.Text as T
import Data.Time.Clock
import Data.Time.Format
@nkpart
nkpart / dirwatch
Created February 9, 2011 06:52 — forked from markhibberd/dirwatch
#!/bin/sh
#
# NAME
# dirwatch - run command on file modification
#
# SYNOPSIS
# dirwatch [-m marker] command dir ...
#
# DESCRIPTION
# dirwatch uses a touch file to track whether files
@sunilnandihalli
sunilnandihalli / curry.clj
Created December 17, 2010 20:33
a macro to create fixed-arity curryable function in clojure
(defmacro def-curry-fn [name args & body]
{:pre [(not-any? #{'&} args)]}
(if (empty? args)
`(defn ~name ~args ~@body)
(let [rec-funcs (reduce (fn [l v]
`(letfn [(helper#
([] helper#)
([x#] (let [~v x#] ~l))
([x# & rest#] (let [~v x#]
(apply (helper# x#) rest#))))]