Skip to content

Instantly share code, notes, and snippets.

View knowsuchagency's full-sized avatar
💭
hustlin'

Stephan Fitzpatrick knowsuchagency

💭
hustlin'
View GitHub Profile
@knowsuchagency
knowsuchagency / get_prefixes.py
Last active April 27, 2021 20:06
get aws ip prefix whitelist
import requests
from pprint import pprint
def get_prefixes(region='us-east-2', service='AMAZON'):
resp = requests.get('https://ip-ranges.amazonaws.com/ip-ranges.json')
prefixes = resp.json()['prefixes']
if region:
@knowsuchagency
knowsuchagency / marp-test.md
Last active April 26, 2021 20:57
marp test
marp
true

Hello, Marp

How goes it?


@knowsuchagency
knowsuchagency / graphql_example.md
Created February 27, 2018 02:30
graphql example story
# package imports

# why all the try excepts?
# because weird stuff happens
# when this code is executed from a jupyter
# notebook vs as a module vs as __main__
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@knowsuchagency
knowsuchagency / hello_lambda.py
Last active November 18, 2019 21:14
boto3 lambda hello world
import tempfile
import zipfile
from pathlib import Path
from pprint import pprint
import boto3
def hello_lambda(
role,
@knowsuchagency
knowsuchagency / bootstrap.sh
Last active October 21, 2019 05:07
bootstrapping a new Mac
#!/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"
@knowsuchagency
knowsuchagency / bootstrap.sh
Last active October 4, 2019 03:49
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 https://pyenv.run | bash
@knowsuchagency
knowsuchagency / docker-compose.yaml
Created January 19, 2019 09:41
shared volumes on docker-compose
volumes:
shared:
driver: local
driver_opts:
type: none
o: bind
device: "${PWD}/shared"
services:
api:
build: ./packages/api
@knowsuchagency
knowsuchagency / readme.md
Last active October 19, 2018 02:41
TruSTAR questionnaire answers

Achievement

One of the things I'm most proud of is the long-term impact I had while working at the NSA -- organizationally, culturally, and pedagogically. When I arrived there and began working as an analyst, the civilian software engineers would build tools for analysts, and those active-duty analysts would use those tools to do their work. Because of cultural differences between federal civilians and military personnel and the way the engineering and analytics are treated as orthogonal to one-another organizationally, there was very little communication between the two teams.

Once I started working as part of the engineering team, I helped bridge that gap in communication between engineering and analysts. In fact, that collaboration was so successful, NSA Hawaii made it a point to create a new role within engineering specifically for a military analyst to work as a software developer and began creating a training pipeline for the role as I was leaving.

Recent book and why one should read it

*Code:

@knowsuchagency
knowsuchagency / dedupe.py
Created October 2, 2018 18:39
deduping things
"""
deduping stuff
"""
import itertools as it
from operator import itemgetter
# using a dict
input_ = [
{'id': 1, 'data': 'hello, world'},