Skip to content

Instantly share code, notes, and snippets.

View brandondurham's full-sized avatar

Brandon Durham brandondurham

View GitHub Profile
@brandondurham
brandondurham / gist:5e127344f3fea6be5f78442966837879
Created July 30, 2018 02:57
CSS: List using a counter that starts with “0” and uses “decimal-leading-zero”
/* CSS */
.Chapters {
column-count: 2;
counter-reset: toc -1;
}
.Chapter {
counter-increment: toc;
list-style-type: none;
@brandondurham
brandondurham / install-app-icons.sh
Created December 10, 2021 21:05
Add custom icons to several apps at once.
#!/usr/bin/env bash
# You will need to update app names, paths to apps, and the location of the
# custom app icons. Also, each app includes a `has_copied` var, and each one
# should be 1 higher than the previous. Lastly, the conditional on line 32
# should be updated to match the value of the last `has_copied`. That will
# trigger a restart of the Dock to ensure the new icons are picked up.
#
# There is likely a MUCH smarter way to pull this off. I welcome
# recommendations and optimizations!
@brandondurham
brandondurham / lowercase-filenames.sh
Created September 20, 2023 17:48
Lowercase all filenames in a directory.
for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done