This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[:group | |
"(" | |
[:nest 2 | |
[:group | |
"let " | |
[:group | |
"[" | |
[:align | |
[:group | |
"x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns async-test | |
(:require time) | |
(:require urllib)) | |
;; See https://github.com/halgari/clojure-py/issues/135 | |
(defmacro time [expr] | |
`(let [start# (time/clock) | |
ret# ~expr] | |
(prn (str "Elapsed time: " (py/round (* (- (time/clock) start#) 1000) 3) " msecs")) | |
ret#)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# monkey-patch https://github.com/ryanb/cancan/issues/327 | |
# put in Rails.root/config/initializers/cancan.rb | |
module CanCan | |
module ModelAdapters | |
class ActiveRecordAdapter | |
private | |
# fix nested imbrication | |
def merge_conditions(sql, conditions_hash, behavior) | |
if conditions_hash.blank? |