Skip to content

Instantly share code, notes, and snippets.

Kevin Sookocheff soofaloofa-zz

Block or report user

Report or block soofaloofa-zz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@soofaloofa-zz
soofaloofa-zz / On choosing a hypermedia type
Last active Apr 12, 2019
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
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/
View numbers.clj
(defn add1 [n]
(+ n 1))
(defn sub1 [n]
(- n 1))
(defn plus [n m]
(cond
(zero? m) n
:else (add1 (plus n (sub1 m)))))
@soofaloofa-zz
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))))
res)))
(defn firsts [lol]
@soofaloofa-zz
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]
(cond
(empty? l) true
(atom? (first l)) (recur (last l))
:else false)))
@soofaloofa-zz
soofaloofa-zz / toys.clj
Created Jun 13, 2011
1. Toys (Clojure)
View toys.clj
(defn atom? [x]
(not (seq? x)))
@soofaloofa-zz
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) {
elm.style.opacity = v/100; // CSS3
elm.style.MozOpacity = v/100; // FF
elm.style.KhtmlOpacity = v/100; // Safari
elm.style.filter=" alpha(opacity ="+v+")"; // IE
};
You can’t perform that action at this time.