Skip to content

Instantly share code, notes, and snippets.

View stanistan's full-sized avatar
🤷‍♂️

Stan Rozenraukh stanistan

🤷‍♂️
View GitHub Profile
@stanistan
stanistan / placeholder.jquery.js
Created February 21, 2011 14:21
Checks if the browser supports the HTML placeholder spec, if not, replaces it with the 'placeholder' attribute. Works in Chrome. IE7/IE8. Assuming it works in FF/Opera.
/*
Placehoder Plugin for jQuery By Stan Rozenraukh
Usage:
$('input').placeholder();
or
$('input').placeholder({
active: 'red',
blurred: 'green'
});
*/
(ns fj
(:import [java.util.concurrent RecursiveTask
ForkJoinPool]))
(set! *warn-on-reflection* true)
;; -----------------------------------------------
;; Helpers to provide an idiomatic interface to FJ
(defprotocol IFJTask
@pelle
pelle / accounts.clj
Created May 8, 2012 14:37
Using database functions in Datomic transactions and annotating transaction history
(use '[datomic.api :only [q db] :as d])
(def uri "datomic:mem://accounts")
;; create database
(d/create-database uri)
;; connect to database
(def conn (d/connect uri))