Skip to content

Instantly share code, notes, and snippets.

Oliver Steele osteele

Block or report user

Report or block osteele

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
osteele / cask
Created Sep 10, 2019
An abbreviation for `brew cask`, that doesn't require remembering which of `search` and `install` is `brew` vs. `brew cask`
View cask
#!/usr/bin/env bash -eu
# Like `brew cask`, except:
# 1. Shorter
# 2. Doesn't require that I remember which of `search` and `install` is `brew` vs. `brew cask`
if [[ $1 == search ]]; then
brew "$@"
brew cask "$@"
osteele /
Last active Jul 10, 2019 — forked from samyk/chrome_tabs.osa
applescript to show all url+titles of Chrome tabs along with front window+tab url+title
#!/usr/bin/env bash
# shows all url+titles of Chrome along with front window+tab url+title
# Source:
# Forked from:
# Original author:
(osascript << EOF
set titleString to ""
tell application "Google Chrome"
osteele /
Created Apr 24, 2018
Chris Morgan's bash-for-recording

A script bash-for-recording, for invocation by termrec. This does the following:

  • Set the window size to 80×24
  • Set HOME to a new empty directory
  • Set USER and NAME to dummy values (creating an actual new throwaway user account would be better here)
  • Set TERM to xterm-256color
  • Clear the environment (env -i)
  • Set a deliberately very simple and obvious prompt (which sets the title as well)
View gist:19ffce479aff5b67ce224cdd9d7db72e
Verifying my Blockstack ID is secured with the address 13WDbJK44r4ysJUH4nJUyHBkgGm7tFabNw
osteele /
Last active Sep 26, 2017
Count the votes in a Liquid Democracy Google Sheet
import pandas as pd
spreadsheet_key = '' # from the Google sheets Publish URL
spreadsheet_range = '' # e.g. B6:E15
url = '{}/pub?gid=0&single=true&output=csv'.format(spreadsheet_key)
if spreadsheet_range:
url += '&range=' + spreadsheet_range
# TODO read this from the doc
osteele / find-malicious-conda-env-packages
Created Sep 15, 2017
Report malicious PyPI packages in conda environments
View find-malicious-conda-env-packages
# Report malicious PyPI packages in each conda environment.
# See discussion at
packages=$(cat <<EOF
# SpaceTranslationPatch patches the MacOS Python IDE to convert spaces to tabs
# when a source file is opened, and back to spaces when it's saved.
# Drop this file on PythonIDE to install it. It requires
# in order to run.
# Version 2 released to the public domain 3 November 1999
# by Oliver Steele (
osteele /
Created May 30, 2017
Build numpy on macOS
brew install gcc
pip install nose numpy Tempita
python -v
osteele /
Created Apr 10, 2017
Bash functions for working on an npm package from within Docker
d.exec () {
docker run \
-v yarn_cache:/root/.cache/yarn \
-v `pwd`:/app \
-v signage_node_modules:/app/node_modules \
-p 3000:3000 \
-it \
node \
osteele / docker-machine-rename
Last active Apr 19, 2017 — forked from alexproca/docker-machine-rename
Rename docker-machine
View docker-machine-rename
#!/usr/bin/env bash -eu
#copy this in a folder from path ex: /usr/local/bin
#usage: docker-machine-rename default my-default
# From
# w/ comments from eurythmia
You can’t perform that action at this time.