I hereby claim:
- I am julienfantin on github.
- I am julienfantin (https://keybase.io/julienfantin) on keybase.
- I have a public key whose fingerprint is 9908 AE54 127E DDF0 313F 0C7A 9FEC 2886 1FF2 0ED1
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(defn distance [a b] | |
(->> (map not= a b) | |
(filter true?) | |
count)) |
(ns beta-api.utils.cache | |
(:require [taoensso.carmine :as car] | |
[clj-time.coerce :as tc] | |
[clj-time.core :as time])) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Redis | |
(def conn-spec {:host "127.0.0.1" | |
:port 6379 |
(do | |
(jdbc/db-transaction [con db-spec] | |
(jdbc/insert! con :user {:name "test" :email "test"}) | |
;; the key here is to derive the inner transaction from the outer connection | |
(jdbc/db-transaction [con2 con] | |
(jdbc/insert! con2 :user {:name "test2" :email "test2"}) | |
;; now this rolls back both inserts | |
(jdbc/db-set-rollback-only! con2))) | |
(println (jdbc/query db-spec ["select * from user"]))) |
LEIN_JAVA_CMD=${LEIN_JAVA_CMD-drip} |
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |