Skip to content

Instantly share code, notes, and snippets.


Stephan Fitzpatrick knowsuchagency

  • San Francisco
Block or report user

Report or block knowsuchagency

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
knowsuchagency /
Last active Nov 18, 2019
boto3 lambda hello world
import tempfile
import zipfile
from pathlib import Path
from pprint import pprint
import boto3
def hello_lambda(
knowsuchagency /
Last active Oct 21, 2019
bootstrapping a new Mac
set -o verbose
set -o xtrace
echo install homebrew
/usr/bin/ruby -e "$(curl -fsSL"
knowsuchagency /
Last active Oct 4, 2019
bootstrap debian vm on gcp with up-to-date python
set -x
sudo apt update
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
curl | bash
knowsuchagency / docker-compose.yaml
Created Jan 19, 2019
shared volumes on docker-compose
View docker-compose.yaml
driver: local
type: none
o: bind
device: "${PWD}/shared"
build: ./packages/api
deduping stuff
import itertools as it
from operator import itemgetter
# using a dict
input_ = [
{'id': 1, 'data': 'hello, world'},
#!/usr/bin/env python3
import subprocess as sp
import io
import os
def paste_emails_to_clipboard(string, report=None):
search the string for emails and copy them to clipboard to be pasted into gmail
knowsuchagency / pyproject.toml
Created Aug 5, 2018
example pyproject.toml
View pyproject.toml
name = "blogify"
version = "0.1.0"
description = ""
authors = ["Stephan Fitzpatrick <>"]
python = "*"
shell_utils = "^0.6.0"
jupyterlab = "^0.33.6"
knowsuchagency / Dockerfile
Created Jul 16, 2018
Makefile Docker Git GitHub multi-stage build ssh private key recipe
View Dockerfile
FROM python:3 as build-system
RUN pip install -U pip
COPY requirements.txt requirements.txt
### create temporary image used to download and vendor packages using private key ###
FROM build-system as intermediate
# add credentials on build
knowsuchagency / notify
Last active Jul 5, 2018
A notification script for mac os
View notify
#!/usr/bin/env python3
import subprocess as sp
import argparse
import shlex
def notify(message: str, title='', subtitle='', sound=''):
Wraps osascript.
knowsuchagency /
Last active Jul 5, 2018
cli script template
#!/usr/bin/env python3
from functools import singledispatch, wraps
from pathlib import Path
import types
import os
from shell_utils import shell, cd
import click
You can’t perform that action at this time.