Skip to content

Instantly share code, notes, and snippets.

@naiquevin
naiquevin / clj-fn-usages
Last active March 8, 2023 17:22
A crude way to find clojure functions usages in a codebase using ripgrep (false positives possible)
#!/usr/bin/env bash
## Script for searching for all references to a particular function in
## a clojure project (A crude implementation of "Find usage"
## functionality commonly found in IDEs such as Intellij) False
## positives are possible.
##
## Usage:
##
## $ clj-fn-usages NAMESPACE_QUALIFIED_FN [ paths ... ]
@naiquevin
naiquevin / backup-git-stashes.md
Last active December 31, 2024 06:15
Script to backup stashes in a git repository

Usage

find . -name '.git' | xargs dirname | xargs -P 4 -n 1 -I % ./backup-stashes.sh % /tmp/stash-backups

Note

Much of the code is generated by Claude Sonnet 3.5. Exercise caution by going through it before executing.