I hereby claim:
- I am arichiardi on github.
- I am arichiardi (https://keybase.io/arichiardi) on keybase.
- I have a public key ASBS7KDW38RUXMhxC2BOsMU5G9me2c2D119-vmmS8onFmwo
To claim this, I am signing this object:
(ns com.andrearichiardi.utils | |
(:require [clojure.java.io :as io])) | |
(defn make-file-from-resource [name] (io/file (io/resource name))) | |
(defn to-bit-representation [^java.lang.Double d] | |
(-> (Double/doubleToRawLongBits d) (java.lang.Long/toBinaryString))) | |
(defmacro with-private-fns [[ns fns] & tests] | |
"Refers private fns from ns and runs tests in context." |
(ns | |
^{:author "Andrea Richiardi" | |
:doc "Bridge helpers between Clojure and Java."} | |
com.andrearichiardi.interop | |
(:require [clojure.reflect :refer [reflect]] | |
[clojure.string :refer [join]])) | |
(defn canonical-name | |
"Return the class' canonical name of an instance, or nil if the input is nil." | |
[^java.lang.Object instance] |
(defn- part-iter | |
([n step step-coll part-coll i part parts] | |
(if (seq step-coll) | |
(if (and (seq part-coll) (< i n)) | |
(recur n step step-coll (rest part-coll) (inc i) (cons (first part-coll) part) parts) | |
(let [nthrst (drop (int step) step-coll)] | |
(recur n step nthrst nthrst 0 nil (cons (reverse part) parts)))) | |
(reverse (if (seq part) | |
(cons (reverse part) parts) | |
parts)))) |
I hereby claim:
To claim this, I am signing this object:
(ns replumb.boot.util | |
(:require [clojure.java.io :as io] | |
[clojure.string :as string] | |
[boot.core :as core] | |
[boot.pod :as pod] | |
[boot.util :as util] | |
[clj-jgit.porcelain :as jgit]) | |
(:import java.io.File | |
java.nio.file.Files | |
java.nio.file.attribute.FileAttribute |
;; https://github.com/boot-clj/boot/pull/398 | |
(defn filter-tmpfiles | |
"Filter TmpFiles that match (a least one in) metadata-preds. | |
Metadata-preds is a set of functions which will receive a TmpFile and | |
tried not in a specific order. If no predicate in the set returns | |
true-y, the file is filtered out from the returned TmpFiles. | |
If invert is specified, the behavior is reversed." | |
([tmpfiles metadata-preds] |
(require '[boot.pod :as pod]) | |
(def pod-deps '[[boot/core "2.6.0" :scope "test"] | |
[adzerk/env "0.3.0" :scope "test"] | |
[me.raynes/conch "0.8.0" :scope "test"]]) | |
(deftask postgres | |
[t type VAL str "The build type as string"] | |
(let [pod (future (pod/make-pod (update-in (get-env) [:dependencies] into pod-deps)))] | |
(with-pass-thru _ |
ns services.email | |
(:require [clojure.tools.logging :as log] | |
[clojure.string :as string] | |
[clojure.java.io :as io] | |
[schema.core :as s] | |
[camel-snake-kebab.core :as csk] | |
[camel-snake-kebab.extras :as cske] | |
[amazonica.core :as aws] | |
[amazonica.aws.simpleemail :as ses] | |
[selmer.parser :as selmer] |
(require 'clojure.repl) | |
;; macros | |
;; https://github.com/boot-clj/boot/commit/045d01101d61d947e1efd729e1f73b5690020928 | |
(intern 'clojure.core (with-meta 'doc {:macro true}) @#'clojure.repl/doc) | |
(intern 'clojure.core (with-meta 'dir {:macro true}) @#'clojure.repl/dir) | |
(intern 'clojure.core (with-meta 'source {:macro true}) @#'clojure.repl/source) | |
;; fns | |
(intern 'clojure.core 'apropos @#'clojure.repl/apropos) |
(def env-web-prod {:resource-paths #{"resources"} | |
:source-paths #{"src/web" "src/shared"} | |
:dependencies '[[org.clojure/clojure "1.9.0-alpha14"] | |
[adzerk/boot-cljs "2.0.0-SNAPSHOT" :scope "test"] | |
[org.clojure/clojurescript "1.9.456" :scope "test"] | |
[org.clojure/test.check "0.9.0"] ;; AR - at the moment we need it, see http://dev.clojure.org/jira/browse/CLJS-1792 | |
[adzerk/env "0.4.0"] | |
[binaryage/oops "0.5.2"] | |
[cljsjs/d3 "4.3.0-3"] | |
[cljsjs/intersections "1.0.0-0"] |