Skip to content

Instantly share code, notes, and snippets.

View seanmhanson's full-sized avatar
Black Lives Matter. Amplify BIPoC voices. Dismantle Whiteness.

Seán Hanson seanmhanson

Black Lives Matter. Amplify BIPoC voices. Dismantle Whiteness.
View GitHub Profile
@seanmhanson
seanmhanson / spectraCleanup.py
Last active December 15, 2016 19:48
Spectra DS CMV.INI Cleanup
# CMV.INI Cleanup Script
# @author = Sean Hanson (github: seanmhanson)
#
# Script used to clean the "CMV.INI" initailization file used by
# MediaOcean Spectra DS to associate MediaOcean sessions with Active Directory Users
#
# INPUT: Flag and path as needed to the cmv.ini file. Default value if left blank is "/cmv.ini".
# See also parseArgs below.
# OUTPUT: None, writes files "newcmv_<datestring>.ini" and "removal_report_<datestring>.csv"
# where the date string is in the format YYYYMMDDHHMMSS
@seanmhanson
seanmhanson / ableismSanityCheck.md
Created April 3, 2017 16:17
Ableist Language in Code: Sanity Check

Ableist Language in Code: Sanity Check

Removing ableist language in code is important; it helps to create and maintain an environment that welcomes all developers of all backgrounds, while emphasizing that we as developers select the most articulate, precise, descriptive language we can rather than relying on metaphors. Quite simply, avoiding ableist language lets us make sure we are inclusive of all developers, while moving toward language that is simultaneously more acccessible to developers whose first language might not be our own.

The phrase sanity check is ableist, and unnecessarily references mental health in our code bases. It denotes that people with mental illnesses are inferior, wrong, or incorrect, and the phrase sanity continues to be used by employers and other individuals to discriminate against these people.

There are a ton of alternatives, and one of the best ways to select one is to ask yourself: What am I actually checking? and select something more descriptive. In everyday c

@seanmhanson
seanmhanson / git-rebase-master
Last active November 1, 2019 16:10
Custom command to rebase a branch off master and optionally stash and pop local changes, or push to remote after
#!/bin/sh
while getopts ":hips" opt; do
case ${opt} in
h ) echo "Usage: git rebase-master [-h] [-i] [-p] [-s]"
echo "[-h] display help and usage (you are here)"
echo "[-i] use an interactive rebase with master"
echo "[-p] push using force-with-lease after rebasing"
echo "[-s] stash changes before and pop after"
exit 0
@seanmhanson
seanmhanson / git-push-up
Last active November 1, 2019 16:11
Custom git command to push to a remote branch matching the local branch name
#!/bin/sh
while getopts ":hfl" opt; do
case ${opt} in
h ) echo "Usage: git push-up [-h] [-f] [-l]"
echo "[-f] push using --force"
echo "[-h] display help and usage (you are here)"
echo "[-l] push using --force-with-lease"
exit 0
;;
@seanmhanson
seanmhanson / git-open.sh
Last active October 28, 2019 15:12
Git Command to stash changes, pull master, and open a new branch
#!/bin/sh
if ! git diff-index --quiet HEAD --; then
echo 'Uncommitted local changes detected. Stashing...'
git stash
fi
echo 'Pulling Master'
git checkout master
git pull origin master
@seanmhanson
seanmhanson / git-commit-message
Last active November 1, 2019 16:10
Custom git command to prefix commit messages with branch and optionally push
#!/bin/sh
while getopts ":ahlp" opt; do
case ${opt} in
h ) echo "Usage: git commit-message [-a] [-h] [-l] [-p] <message>"
echo "[-a] stage all changed files before committing"
echo "[-h] display help and usage (you are here)"
echo "[-l] push using force-with-lease after committing"
echo "[-p] push after committing"
exit 0
@seanmhanson
seanmhanson / leavesToSaplings.zs
Created January 17, 2021 05:15
A crafttweaker recipes script to map 3 x 3 leaves into the corresponding saplings
# Convert 3 x 3 leaves into a corresponding sapling
#
# This includes support for:
# - Vanilla MC
# - Quark
# - Biomes o' Plenty
# - Defiled Lands
# Willow
recipes.addShaped(
@seanmhanson
seanmhanson / Soto Ayam.md
Last active August 4, 2021 16:12
Recep Soto Ayam

Soto Ayam (Javanese Chicken Soup)

Adapted from:

  • Soto Ayam, from Coconut & Sambal, Lara Lee
  • Indonesian Chicken Soup, from New York Times Cooking, Julia Moskin and James Oseland
  • Opor Ayam, from New York Times Cooking, Tejal Rao and Retno Pratiwi

Ingredients

Stock / Base

  • 3lbs chicken, quartered
  • 3 lemongrass stalks, bruised, split, and tied in a knot
@seanmhanson
seanmhanson / Instant Pot Bubur Ayam
Created August 23, 2021 00:16
Recep Instant Pot Bubur Ayam
# Instant Pot Bubur Ayam (Chicken Coconut Congee)
Adapted from:
- Instant Pot Congee, [Budget Bytes](https://www.budgetbytes.com/instant-pot-congee-jook/)
- Bubur Ayam, from *Coconut & Sambal*, Lara Lee
- Nasi Uduk, from *Coconut & Sambal*, Lara Lee
## Ingredients
### Congee & Base
- 1 cup jasmine rice
- 1in ginger, peeled and thinly sliced
@seanmhanson
seanmhanson / superior-stock.md
Created March 7, 2022 02:18
Notes on preparation of Superior Stock (上湯)

Superior Stock (上湯, shàng tāng)

There are so many different recipes, approaches, and flavor profiles that can make up a superior stock, but all have a few things in common: complexity, clarity, a silky smooth mouth-feel, and a higher gelatin content than a regular chicken broth.

These are my own notes on the ways I typically make my stock, though I often make do with what I have accumulated and what I pick up on monthly trips into Queens to my favorite Chinese supermarket that carries all the otherwise hard-to-find goodies I'm in love with. This stock does take time, but it doesn't need to cost a ton, and is an exquisite replacement for chicken broth/stock in most any recipe, Chinese or otherwise.

Ingredients

I think of ingredients in a superior stock as basically falling into the categories of actual meat, bones or other leftovers saved for stock, and seasoning/dried goods. What actually makes these up changes based off what I have.

Chicken

Wings and Legs are a must, and I save them when breakin