Skip to content

Instantly share code, notes, and snippets.

View shyblower's full-sized avatar

Thomas Scheiblauer shyblower

View GitHub Profile
@shyblower
shyblower / lambda-callback.cljs
Last active July 7, 2016 16:00
Lambda callback
(deftype QuiescentLambdaCallback [closure f]
IEquiv
(-equiv [this other]
(and (instance? QuiescentLambdaCallback other)
(= (.-closure this) (.-closure other))))
IFn
(-invoke [this & args] (apply (.-f this) args)))
(defn lcb
@shyblower
shyblower / gist:3723911
Created September 14, 2012 18:53
kanso + angular + jquery.mobile
//kanso.json
{
"name": "angular-test",
"version": "0.0.1",
"description": "angular test app",
"attachments": "static",
"modules": ["modules", "views"],
"load": "modules/couch/couch",
"dependencies": {
"modules": null,
@shyblower
shyblower / cljs-remoting
Created December 23, 2011 20:54
clojurescript client side remoting
(ns client.html.api.utils
(:use [client.html.utils :only [clj->js]]))
(def $ js/$)
(def ajax-options {:timeout 30000})
(defn remote [type url data & {:keys [on-success on-error]}]
(->
(.ajax $ url