Skip to content

Instantly share code, notes, and snippets.

View wdhowe's full-sized avatar

Bill Howe wdhowe

  • United States
View GitHub Profile
@wdhowe
wdhowe / git-single-dir-checkout.md
Created October 24, 2024 13:24
Git: Checkout a single directory from a git repo

Git: Checkout a single directory from a git repo

Setup Directory

mkdir myrepo && cd myrepo
git init

Configure Repo

@wdhowe
wdhowe / git-repo-move.md
Last active December 14, 2025 00:59
Git: Move files and history from oldrepo to newrepo

Git: Move files and history from oldrepo to newrepo

Example commands show moving the "data" directory from oldrepo to newrepo and includes all history.

oldrepo (the source)

  • Clone a fresh copy of oldrepo.

git clone git@github.com:USERHERE/oldrepo.git

@wdhowe
wdhowe / .bashrc
Last active April 7, 2026 21:32
bashrc/profile
##-- Aliases --##
alias ll='ls -l'
alias k='kubectl'
alias ke='kubectl exec -it'
alias kc='kubectx'
alias kn='kubens'
##-- Completions and Prompt --##
@wdhowe
wdhowe / local-clj-docs.md
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
wdhowe / renew-expired-gpg-key.md
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
wdhowe / git-cheatsheet.md
Last active December 9, 2025 17:17
Git Commands Cheat Sheet

Git Commands Cheat Sheet

Configuration

List Current Global Settings

git config --global --list
@wdhowe
wdhowe / cert-check.sh
Created February 2, 2024 18:47
Certificate View from the Shell
#!/bin/bash
url=$1
echo | \
openssl s_client -showcerts -servername ${url} -connect ${url}:443 2>/dev/null | \
openssl x509 -inform pem -noout -text
@wdhowe
wdhowe / errors_success.clj
Last active February 3, 2024 21:03
Clojure Errors/Success collection checking
;; These protocols are also available in: https://github.com/wdhowe/clj-contrib
(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
clojure.lang.Sequential
(errors
[coll]
@wdhowe
wdhowe / git-broken-refs.md
Last active May 12, 2026 08:04
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
wdhowe / simplicity.md
Created April 11, 2021 03:34
simplicity

Simplicity

Notes from Rich Hickey's Simplicity Matters slides.

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

Toolkit

Complexity Simplicity