Skip to content

Instantly share code, notes, and snippets.

View shcallaway's full-sized avatar
😉
Building Opkit

Sherwood Callaway shcallaway

😉
Building Opkit
View GitHub Profile
@shcallaway
shcallaway / rinkeby
Created October 20, 2017 23:57
Rinkeby Authenticated Faucet
0xCb412a89385F3bBD16545Ee767030bFfB3e1B6Df
@shcallaway
shcallaway / counter.sh
Last active September 24, 2018 19:15
Stream stdout from a Python subprocess
#!/bin/bash
for i in `seq 1 10`; do
echo $i
if [ "$i" = "5" ]; then
>&2 echo "Error!"
exit 1
fi
@shcallaway
shcallaway / generate-commit-log.sh
Last active October 3, 2018 17:37
Create a CSV of your commits in a certain git repository
#!/bin/bash
git log --pretty=format:'%h;%an;%ad;%s' --author='Sherwood Callaway' > ~/log.csv
@shcallaway
shcallaway / README.md
Last active December 14, 2018 21:59
Download a CSV of Wealthfront's Career Launching Companies
@shcallaway
shcallaway / Dockerfile
Last active December 14, 2018 22:00
Fix "Python ImportError: No module named '_curses'"
FROM ubuntu
RUN apt-get update && apt-get install --assume-yes make wget gcc zlib1g:amd64 zlib1g-dev:amd64
# Uncomment the following line to make 'import curses' work
# RUN apt-get update && apt-get install -y libncursesw5-dev
ENV PYTHON_VERSION 3.6.1
RUN wget --quiet https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz && \
tar xzvf Python-$PYTHON_VERSION.tgz && \
cd Python-$PYTHON_VERSION && \
@shcallaway
shcallaway / trees.py
Last active January 5, 2019 23:22
Python implementation of various types of trees
import contextlib
@contextlib.contextmanager
def raises(exception):
try:
yield
except exception as e:
assert True
else:
@shcallaway
shcallaway / kubectl-cp.sh
Created January 23, 2019 23:06
Copy a file from a Kubernetes pod to local filesystem
#!/bin/bash
echo Namespace: $1
echo Pod: $2
echo Source file: $3
echo Target file: $4
kubectl cp $1/$2:$3 $4
@shcallaway
shcallaway / grep-jenkins-configs.sh
Last active February 4, 2019 20:38
Grep across all Jenkins configurations
#!/bin/bash
grep -Hni $1 ${JENKINS_HOME:-/var/jenkins_home}/**/*/config.xml
@shcallaway
shcallaway / README.md
Created February 22, 2019 19:34
Bookmarklet for getting past digital publication paywalls

When creating a new browser bookmark, paste the following code snippet into the "Location" field:

javascript:(function(){window.location="https://outline.com/"+window.location;})();

Now visit an article that has a paywall, and click your bookmarklet!