Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
(defmacro test-> | |
"Takes an expression and a set of test/form pairs. Threads expr (via ->) | |
through each form for which the corresponding test expression (not threaded) is true." | |
[expr | |
& clauses] | |
(assert (even? (count clauses))) | |
(let [g (gensym) | |
pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))] | |
`(let [~g ~expr | |
~@(interleave (repeat g) (map pstep (partition 2 clauses)))] |
(require '[datomic.api :as d]) | |
(require '[clojure.pprint :refer [pprint]]) | |
(def uri "datomic:free://localhost:4334/git") | |
(def conn (d/connect uri)) | |
(def db (d/db conn)) | |
;; committers | |
(d/q '[:find ?email | |
:where | |
[_ :commit/committer ?u] |
Do your part to resist Government surveillance and take back your privacy:
/** | |
* In this gist, assume that we're using Chrome, and the following variables are in scope and have already been assigned to the following: | |
* | |
* var url = "http://upload.wikimedia.org/wikipedia/commons/b/be/Toccata_et_Fugue_BWV565.ogg"; | |
* var webaudio = new webkitAudioContext(); | |
* var renderCallback = function renderCallback(data) { return "render!"; } // a function which will render the given audio data on a canvas | |
*/ | |
// Fetch the data with an AJAX request | |
var xhr = new XMLHttpRequest(); |