Skip to content

Instantly share code, notes, and snippets.

@stuarthalloway
stuarthalloway / gist:5199642
Created March 19, 2013 20:11
Draw a pedestal dataflow with dorothy + Graphviz
;; from leiningen, use [dorothy/dorothy "0.0.3"]
(require '[dorothy.core :as dot])
;; dataflow copied from chat
;; https://github.com/pedestal/samples/blob/master/chat/chat-client/app/src/chat_client/behavior.clj
(def dataflow '{:transform
{:outbound {:init {} :fn outbound-transform}
:inbound {:init {} :fn inbound-transform}
:nickname {:init nil :fn nickname-transform}}
:effect {:outbound send-message-to-server}
@acolyer
acolyer / service-checklist.md
Last active July 10, 2024 05:13
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@ohpauleez
ohpauleez / colorblock.sh
Last active September 9, 2016 15:24
Capture blocks of Clojure code in the paste buffer for making Keynote presentations
#!/usr/bin/env bash
## Given a Clojure source file, 'example.clj'
## Where the contents are captured by START and END comments like:
##
## ;;START SomeTagName
## (println (inc 2))
## ;;END
##
## Run this script: colorblock.sh example.clj SomeTagName
@cgrand
cgrand / kein.sh
Last active May 31, 2017 14:11
Launch a plain clojure repl according to project.clj without leiningen (most of the time)
#!/bin/bash
# launch a clojure plain repl but with options and classpath matching project.clj
# Except when project.clj changes (and on first launch), lein is not called.
CODE='
(let [p (leiningen.core.project/read)
args (@(var leiningen.core.eval/get-jvm-args) p)
cp (with-out-str (leiningen.classpath/classpath p))]
(print "ARGS=\"")
(apply print args)
0eNrkvUtvJEmWpflXAr6o3qQFVK68c9fZgx4MUAUMumbXSCSMdHN36zA+ykhGZKDg/32MdBqpJEXFzjlqGshCbioyooxXRK/IleeR7/7np4vdw+Z2v72+/9vFzc0vn/78n6//5e7Tn//36F8f/3/by5vrH//5bvv1er17/G/3v99uPv3506/b/f3D4b/86dP1+urxP/z4xerfPn3/06ft9efN3z/92X3/E/GX/330l0b95b+O/tLLfxm+//VPnzbX99v77ebHRz/9y+9/u364utjsD5/z8tdXm8/bh6vVZre5vN9vL1e3N7vNwfbtzd3hj2+uHwt+NPinT79/+vPK6vfHOr0zZi/G9jcXN7c3+/uPBlap/ByfjcSfY8uMR8y4k2YCYMa7U1YiYKWctJJeG+lqvdutduur28ZH5eHZjG8ZyS9GLrZfTzXU2M92qNSfPh36/fXhT7ZP3f8/P7nH/7PffB73iu3h39wwKvrxP1R76kVf95vNNfbj763aF8wFKfdcUDEjIfaMuIFyZPCaI/M71zg/6cbWT5tOdA50gHUdYJgV63ZH5yk3unP1R5fw7vj427YjA+YC1+2OLkJW+r0xMW5MohP9e8fUaSe2ftt2YoY+v3Q/HxsXfL8rVsaHo0Gfc2J65xizaSe2ftt0og2YA3zPAYaNC7HbE80YL0a1K9b3nonTXmz9tu1Fjzmg2xcNGxRKty9aZLxYxL5o9j5Ih05IT/y67UlsrVL6/XE0Mtzf7NdfN6v79fUvrSXPs51y+PbP2/2PT39eLL83+jpU3G5vDxZvVl/3Nw/Xn1tm3Q+z9a3Z1DJbcbMpNs22ausHwmyAa+sdbjZ63KwRZgPuBI+bDR43GwizhjshvjHbMOZfulXrzxNeK2/4x2bC7IB/LBFNj/MrapaIJhtgJwQimipulQimArsg4LGEB2jAIwnvWgGPI4dHZ4i4VXzgC3h0WcSt4sFl+LAX8Njy+IwS6onh6XEAmhyd4nDqr3Pvr18j5fH87DCZ368ub64