Skip to content

Instantly share code, notes, and snippets.

View evanrrees's full-sized avatar

Evan Rees evanrrees

  • Embark Veterinary, Inc
  • Ithaca, NY
View GitHub Profile
@evanrrees
evanrrees / unsubl.sh
Created September 17, 2021 17:00
Unsubscribe from lyrist listserv
#!/usr/bin/env bash
# Evan Rees
# err87@cornell.edu
# 13 Sep 2021
# Generate mailto link for joining / leaving Cornell listservs.
# This just wraps the one-liner at the end.
# The link can be opened in any browser or with the macOS `open` command.
@evanrrees
evanrrees / unprotect-excel.sh
Last active January 19, 2022 10:05
Remove sheet protections in Excel workbooks
#!/usr/bin/env bash
# Evan Rees
# err87@cornell.edu
# August 2021
# Remove sheet protections from .xlsx or .xls files
usage() {
cat <<EOF
@evanrrees
evanrrees / homebrew-gnubin.md
Last active April 10, 2024 18:16 — forked from skyzyx/homebrew-gnubin.md
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.