Skip to content

Instantly share code, notes, and snippets.


Dustø Masterson Goldman roosto

  • RubiconMD
  • Brooklyn, NY
View GitHub Profile
roosto / set-secret.bash
Last active Apr 6, 2021
a secure bash shell function to interactively set and export an environment variable
View set-secret.bash
function set-secret {
# TODO: handle signals: an ill-timed signal could leave the user
# with a non-sane terminal, which can really foul things up
# even for experienced users
roosto / pbmunge.bash
Created Sep 2, 2020
Filter/Modify contents of the macOS pasteboard using arbitrary commands
View pbmunge.bash
function pbmunge {
if [[ "$1" ]] && echo "$1" | grep -q -e '^-h$' -e '^--help$'
echo 'Usage: pbmunge utility [util-arg ...]'
echo ''
echo "Filter (or munge) contents of the macOS pasteboard using \`utility'"
echo " \`utility' will be invoked with any supplied util-arg(s)"
echo ''
echo 'Example: increase the quote level of a plain text email'
roosto / log_defaults_writes.bash
Last active Sep 2, 2020
func to use in bash to log invocations of `defaults write`
View log_defaults_writes.bash
# to be run as your `PROMPT_COMMAND`, this will log any invocations of `defaults write`
# now you stand a chance of figuring out which time when you pasted something from a
# random website into your terminal months ago is now totally screwing up your mac
function __log_defaults_writes {
local DEFAULTS_WRITES_HISTORY="$HOME/.defaults_writes"
if history 1 | grep -F -q 'defaults write'
chmod u+w "$HOME/.defaults_writes" # make log file writeable
echo -en "$(date +%Y%m%d.%T):\t"$'\t' >> "$DEFAULTS_WRITES_HISTORY" # add timestamp
roosto /
Created Oct 18, 2018
Some python to pull Info.plist values out of a .ipa file
# This has to be run on macOS, because it relies on `plutil(1)` to convert binary Info.plist files
# into ASCII xml plist files. If you know the Info.plist will not be binary, you should be able to
# run this on other systems with minimal modification
# we pass the file path of the .ipa and array of plist keys to retrieve
# returns: a dict of the plist keys and their values as found in the app’s Info.plist
def get_attritubes_from_ipa(ipa_file, attributes):
retval = {}
zip_archive = zipfile.ZipFile(ipa_file, 'r')
roosto /
Created Aug 5, 2018
A quick guide for useful unix commands for use in macOS

macOS & Unix: Making the World’s Best Desktop Even Better

General Tips

  1. Drag a file onto the terminal to get its path put on the command line
  2. In the Finder ⇧⌘G gives a dialogue box to open a location, that can use tab completion.
  3. Pressing / or ⇧⌘G in any file picker dialogue will give you the same file location dialogue box.
  4. Show/hides hidden files in a save dialogue box: ⇧⌘.


roosto /
Created Jul 26, 2018
Notes from my Creative Coding NYC ASCII Art Talk on July 25, 2018

Creative Coding NYC ASCII Art Talk

Here are links and follow-up notes from the ASCII Art Tips & Trick talk by Dustin Goldman, originally presented at the [Creative Coding X meetup][1].

Dustin hopes you enjoyed the talk. If you have any questions, feel free to contact him on twitter, where he is [@roosto][2]


per the [FIGlet website][3]:

roosto / cowtip-cows.txt
Last active Jul 26, 2018
A collection of custom cowsay .cow files
View cowtip-cows.txt
# all the custome .cow files from
# Author: Dustin Goldman <>
##### ducks.cow #####
$the_cow = <<COW;
>(.)__ <(.)__ =(.)__
roosto /
Last active Apr 6, 2016 — forked from poweld/
Annoy your coworkers with massive emoji banners in Slack
function party {
if ! command -v figlet > /devc/null; then
if ! command -v brew > /dev/null; then
echo Requires figlet or brew to be installed 1>&2
return 1
brew install figlet || exit $?
if [ -z "$1" ]; then
roosto /
Last active Aug 29, 2015
A file for a “Code Golf” challenge. Specially “Timber”, № 8, here:
# roosto’s “Code Golf” v3 149 characters
# problem is #8 here:
# The basic idea here is to go line by line, looking through the current line for whitespace.
# When we find a whitespace character we see if the character above it needs
# to have a non-whitespace character, a.k.a. a “supporting” character below it.
# If the “supporting” character above the whitespace character is not '/' or '\', a.k.a. a “bracing” character,
# then shit is fucked. We make comparisons easier and severely limit corner cases by
# kinda normalizing the input with a few regexs before we get into it.
roosto / jenkins_login_redirect.js
Last active Aug 29, 2015
Reload Jenkins Login Page Bookmarklet
View jenkins_login_redirect.js
Dustin Masterson aka @roosto
If you have been logged out of jenkins and you open your browser and your
browser reopens a slew of tabs from your jenkins instance, each page will
redirect you to a login page.
Annoyingly even after you login on one of these login pages, reloading
another page will still load the login page, instead of the page that you