Skip to content

Instantly share code, notes, and snippets.

View gtuckerkellogg's full-sized avatar

Greg Tucker-Kellogg gtuckerkellogg

View GitHub Profile
@qerub
qerub / gist:3219854
Last active April 21, 2021 09:46
Representing [Clojure] code in JSON
; Context:
; http://stackoverflow.com/questions/3436216/how-to-map-clojure-code-to-and-from-json
(defn escape-string [x]
(clojure.string/replace x #"^[':\\]" "\\\\$0"))
(defn code-to-json [x]
(condp #(%1 %2) x
number? x
symbol? (str \' (name x))
@swannodette
swannodette / gist:1667847
Created January 24, 2012 04:40
hierarchy.clj
(ns hierarchy.core
(:refer-clojure :exclude [==])
(:use [clojure.core.logic]))
(def order [:domain :kingdom :phylum :class :order :family :genus :species])
(def homo-sapiens
{:domain :eukarya
:kingdom :animalia-metazoa
:phylum :chordata
@kaleb
kaleb / aliases
Created October 15, 2011 15:51
Gmail on Mutt
#~/.mutt/aliases
alias nick Nicholas Levandoski <[email protected]>
alias tim Timothy Pitt <[email protected]>
alias steven Steven Jackson <[email protected]>
alias kaleb Kaleb Hornsby <[email protected]>
alias alug-admin nick, tim, steven