Skip to content

Instantly share code, notes, and snippets.

View wdhowe's full-sized avatar

Bill Howe wdhowe

View GitHub Profile
wdhowe /
Last active February 3, 2024 18:22
Analyze Clojure Docs Locally

Analyze Clojure Docs Locally

Analyzing your project via the cljdoc-analyzer locally will ensure that when your project is pushed to clojars, the API docs will have a much better chance of successfully generating.

Install the cljdoc-analyzer.

clojure -Ttools install io.github.cljdoc/cljdoc-analyzer '{:git/tag "RELEASE"}' :as cljdoc
wdhowe /
Last active February 3, 2024 20:59
Renew Expired GPG Key

Extend your GPG key expiry

  • Find the ID of the expiring key. Note your key ID.

    gpg --list-secret-keys
  • Start editing the key.

wdhowe /
Last active February 3, 2024 21:01
Git Commands Cheat Sheet

Git Commands Cheat Sheet


List Current Global Settings

git config --global --list
wdhowe /
Created February 2, 2024 18:47
Certificate View from the Shell
echo | \
openssl s_client -showcerts -servername ${url} -connect ${url}:443 2>/dev/null | \
openssl x509 -inform pem -noout -text
wdhowe / errors_success.clj
Last active February 3, 2024 21:03
Clojure Errors/Success collection checking
View errors_success.clj
;; These protocols are also available in:
(defprotocol Errors
"A protocol for finding errors in a collection."
(errors [coll] "Returns a map of the `:counts/errors`, which are entries with `:error` keys."))
(extend-protocol Errors
wdhowe /
Last active November 19, 2021 02:31
Fix git broken ref refs/remotes/origin/HEAD

Error seen during git commands

"warning: ignoring broken ref refs/remotes/origin/HEAD"

The Fix

Check remote branches

git branch -r
wdhowe /
Created April 11, 2021 03:34


Notes from Rich Hickey's Simplicity Matters slides.

"Simplicity is the ultimate sophistication." -Leonardo da Vinci


Complexity Simplicity
wdhowe /
Last active April 11, 2021 03:17
wdhowe / as_some.clj
Last active February 3, 2024 21:04
Clojure macro: as-some->
View as_some.clj
;; This macro is also available in:
(defmacro as-some->
"as->, with the nil checking of some->.
Binds name to expr. When name is not nil, evaluates the first
form in the lexical context of that binding. When that result
is not nil, then binds name to result, repeating for each
successive form."
[expr name & forms]
(let [steps (map (fn [step] `(if (nil? ~name) nil ~step))
wdhowe / Makefile
Last active April 11, 2021 22:10
An example Makefile for Docker and Leiningen.
View Makefile
.PHONY: build test deploy
##-- Environment Variables --#
# Image and container registry
IMAGE_NAME := my-image-name
IMAGE_PATH := mygroup/myproject
REGISTRY := registry-url:port