This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tempfile | |
import zipfile | |
from pathlib import Path | |
from pprint import pprint | |
import boto3 | |
def hello_lambda( | |
role, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o verbose | |
set -o xtrace | |
echo install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
$PATH="/usr/local/bin:$PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 https://pyenv.run | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volumes: | |
shared: | |
driver: local | |
driver_opts: | |
type: none | |
o: bind | |
device: "${PWD}/shared" | |
services: | |
api: | |
build: ./packages/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
deduping stuff | |
""" | |
import itertools as it | |
from operator import itemgetter | |
# using a dict | |
input_ = [ | |
{'id': 1, 'data': 'hello, world'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "blogify" | |
version = "0.1.0" | |
description = "" | |
authors = ["Stephan Fitzpatrick <knowsuchagency@gmail.com>"] | |
[tool.poetry.dependencies] | |
python = "*" | |
shell_utils = "^0.6.0" | |
jupyterlab = "^0.33.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import subprocess as sp | |
import argparse | |
import shlex | |
def notify(message: str, title='', subtitle='', sound=''): | |
""" | |
Wraps osascript. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |