Skip to content

Instantly share code, notes, and snippets.

View charlesreid1's full-sized avatar
💭
🍒 🍍 🍓 🍊 🍌

Chaz Reid charlesreid1

💭
🍒 🍍 🍓 🍊 🍌
View GitHub Profile
@charlesreid1
charlesreid1 / zappa_iam_policy.md
Last active October 16, 2021 16:52
Zappa IAM policy

By default, zappa has an extremely insecure and hand-wavey approach to permissions, which is to

This gist contains an IAM policy document that can be attached to a role, and/or to an IAM user, that will allow the IAM user to perform all of the ncessary actions required to deploy a zappa function.

Via Cisco: https://github.com/CiscoSecurity/tr-05-serverless-microsoft-defender-for-endpoint/blob/3d9248a06ff287db23a06e88296a5d3fa6713ab4/aws/ZappaLambdaDeploymentPolicy.json

More info: https://github.com/CiscoSecurity/tr-05-serverless-microsoft-defender-for-endpoint/blob/3d9248a06ff287db23a06e88296a5d3fa6713ab4/aws/HOWTO.md#sample-aws-iam-policy-for-deployment-zappalambdadeploymentpolicy

@charlesreid1
charlesreid1 / zappa_deployer.json
Created October 16, 2021 01:13 — forked from caseydm/zappa_deployer.json
Zappa IAM Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:PutRolePolicy"
],
"Resource": [
@charlesreid1
charlesreid1 / blaseball_divisions.json
Created September 1, 2020 07:47
Blaseball team division and league information in JSON format
{
"Lawful Good": [
"Lovers",
"Tacos",
"Steaks",
"Breath Mints",
"Firefighters"
],
"Chaotic Good": [
"Shoe Thieves",
@charlesreid1
charlesreid1 / allstars.py
Last active May 2, 2022 06:34
quick-n-dirty script to get a list of all starred Github repos for a given user using Python and PyGithub
from github import *
import sys
import json
def usage():
print("")
print("allstars.py: script to print all repos starred by a Github user")
print("Usage: python allstars.py [USERNAME]")
print("")
@charlesreid1
charlesreid1 / get_all_bundles.py
Last active October 22, 2019 16:26
output from DSSClient.get_bundles_all()
import json
from hca.dss import DSSClient
dss = DSSClient()
print(dss.get_all_bundles(replica="gcp"))
print(dss.get_all_bundles(replica="aws"))
@charlesreid1
charlesreid1 / simple_arg.py
Created July 23, 2019 22:28
A very simple argparse example. Takes one argument, a path to a folder (-d or --dir); prints whether that folder exists.
import os, sys
import argparse
"""
A Simple Argparse Program
That Works Just The Way
We Like It.
Charles Reid
@charlesreid1
charlesreid1 / example_hyperas.ipynb
Created May 20, 2019 20:53
example_hyperas.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@charlesreid1
charlesreid1 / poly_circ_undirected.tex
Created March 17, 2019 23:08
TeX for drawing circles with inscribed polygons and labeled vertices, for the Josephus problem.
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{xintexpr}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=3]
% make a node with variable name pol (with the list of features given) at the location (0,0), and don't label it
\node (pol) [draw=none, thick, black!90!black,rotate=0,minimum size=6cm,regular polygon, regular polygon sides=11] at (0,0) {};
@charlesreid1
charlesreid1 / poly_directed.tex
Last active March 17, 2019 20:41
TeX for drawing labeled polygons with directed and undirected paths (for illustrating solutions to the Josephus problem).
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{xintexpr}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=3]
% make a node with variable name pol (with the list of features given) at the location (0,0), and don't label it
\node (pol) [draw, thick, black!90!black,rotate=0,minimum size=6cm,regular polygon, regular polygon sides=11] at (0,0) {};
@charlesreid1
charlesreid1 / polygon.tex
Last active March 17, 2019 20:40
TeX for drawing labeled polygons (for illustrating solutions to the Josephus problem).
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{xintexpr}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=3]
% make a node with variable name pol (with the list of features given) at the location (0,0), and don't label it
\node (pol) [draw, thick, black!90!black,rotate=0,minimum size=6cm,regular polygon, regular polygon sides=11] at (0,0) {};