Skip to content

Instantly share code, notes, and snippets.


Kevin Sookocheff soofaloofa-zz

View GitHub Profile
soofaloofa-zz / On choosing a hypermedia type
Last active Mar 13, 2020
On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!
View On choosing a hypermedia type
A comparison of Collection+JSON, HAL, JSON-LD and SIREN media types.
Discussion at
View numbers.clj
(defn add1 [n]
(+ n 1))
(defn sub1 [n]
(- n 1))
(defn plus [n m]
(zero? m) n
:else (add1 (plus n (sub1 m)))))
soofaloofa-zz / cons.clj
Created Jun 17, 2011
3. Cons the Magnificent
View cons.clj
(defn rember [atom l]
(loop [lat (seq l) res []]
(if lat
(let [f (first lat)]
(if (= f atom)
(next lat)
(recur (next lat) (conj res f))))
(defn firsts [lol]
soofaloofa-zz / doit.clj
Created Jun 14, 2011
2. Do It, Do It Again, and Again, and Again ...
View doit.clj
(defn atom? [x]
(not (seq? x)))
(defn lat? [x]
(loop [l x]
(empty? l) true
(atom? (first l)) (recur (last l))
:else false)))
soofaloofa-zz / toys.clj
Created Jun 13, 2011
1. Toys (Clojure)
View toys.clj
(defn atom? [x]
(not (seq? x)))
soofaloofa-zz / fade.js
Created May 18, 2011
Dissecting jQuery's Fade Animation
View fade.js
function $(id) {
var $ = document.getElementById(id);
var opacityTo = function (elm, v) { = v/100; // CSS3 = v/100; // FF = v/100; // Safari" alpha(opacity ="+v+")"; // IE
You can’t perform that action at this time.