Skip to content

Instantly share code, notes, and snippets.

@tjg
tjg / excel-templates-tables.clj
Created March 15, 2017 20:39
Little hack I use to extend Excel tables to the end of the data when using the excellent tomfaulhaber/excel-templates
(defn extend-table-to-end! [table worksheet]
(try
(let [start (.getStartCellReference table)
end (.getEndCellReference table)
last-row-num (.getPhysicalNumberOfRows worksheet)
;; Excel doesn't like zero-sized tables.
last-row-num (if (= last-row-num (.getRow start))
(inc last-row-num)
last-row-num)
new-range (-> (CellRangeAddress. (.getRow start) last-row-num
@tjg
tjg / helm-clojure-headlines.el
Last active July 5, 2022 13:27 — forked from juxtin/helm-clojure-headlines.el
helm-clojure-headlines
;; Might want to customize helm-candidate-number-limit, because by
;; default it shows 100 matches maximum.
;; FIXME: collect line count, and display if it's past helm-candidate-number-limit.
(defun helm-headlines (headline buffer-name good-regex exception-regex)
"Display headlines for the current file.
Displays lines where good-regex matches, except for those
which also match exception-regex."
java.io.FileNotFoundException: Could not locate clojure/tools/analyzer__init.class or clojure/tools/analyzer.clj on classpath:
at clojure.lang.RT.load (RT.java:443)
clojure.lang.RT.load (RT.java:411)
clojure.core$load$fn__5018.invoke (core.clj:5530)
clojure.core$load.doInvoke (core.clj:5529)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.core$load_one.invoke (core.clj:5336)
clojure.core$load_lib$fn__4967.invoke (core.clj:5375)
clojure.core$load_lib.doInvoke (core.clj:5374)
clojure.lang.RestFn.applyTo (RestFn.java:142)