Skip to content

Instantly share code, notes, and snippets.

@bencrowder
bencrowder / dub.sh
Last active February 15, 2022 04:53
Batch file renaming for zsh.
#!/bin/zsh
# Batch rename
# Usage: dub image-X.jpg *.jpg
#
# - First argument is template for renaming
# - The "X" in the template will be replaced with zero-padded numbers
# (e.g., image-001.jpg, image-002.jpg, etc.)
#
# More examples:
@bencrowder
bencrowder / gc_references.py
Last active December 29, 2023 19:48
Small Python script to scrape LDS General Conference transcripts and output HTML page listing scripture references. Example: http://bencrowder.net/files/gc-references/2013-04
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import codecs
import requests
import bs4
# Change these
year = 2013