Skip to content

Instantly share code, notes, and snippets.

View gaieges's full-sized avatar

Evin Callahan gaieges

View GitHub Profile
@gaieges
gaieges / python.py
Created April 10, 2018 20:24
map / foreach
>>> x = ['a', 'b', 'c']
>>> x
['a', 'b', 'c']
>>> list(map(lambda z: z+'-peen' , x))
['a-peen', 'b-peen', 'c-peen']
>>> for z in x:
... print(z+'-peen')
...
a-peen
b-peen
@gaieges
gaieges / docker-compose.yml
Created March 8, 2020 16:14
Homeassistant with traefik 2.2 for TLS in docker-compose in network_mode: host
version: '2.1'
services:
homeassistant:
restart: always
image: homeassistant/raspberrypi3-homeassistant
expose:
- 8123
ports:
- "8123:8123"
@gaieges
gaieges / docker-compose.yml
Created March 10, 2020 23:44
Using docker env vars to set config file in image at run time
# this file is intended to be used in the local build environment
# to get started, run:
#
# docker-compose up
#
# REQUIRES docker-compose 1.16+
version: '2.3'
@gaieges
gaieges / README.md
Last active November 2, 2020 18:18
Getting all k8s secrets in plaintext

Couldn't find any tools out there aside from ksd which is great in a case where you need to look at individual secrets, but doesn't work if you are looking through many secrets.

How

Instead, I managed to find a way to do this in a bash shell instead:

# get all secrets
kubectl get secrets -o json --all-namespaces > /tmp/all.json

# use jq to look through and dump all the cleartext secret values:
@gaieges
gaieges / openapi.yaml
Created February 12, 2023 01:46
techspecs mobile device api spec
{
"openapi": "3.0.0",
"info": {
"version": "3.27",
"title": "Free",
"description": "Free Forever"
},
"servers": [
{
"url": "https://apis.blobr.app/f9g3z21kiqc0hz9s",
@gaieges
gaieges / README.md
Last active October 11, 2024 11:21
Parse'ing Sendgrid inbound messages via webhook in python and fastapi

Sendgrid inbound parse'ing in python and fastapi

This took me far too long to figure out how to parse emails coming in from sendgrid's "inbound parse" tool to receive an email via webhook, so I saved it for others to view if they stumble upon it.

The key to this is to check off the setting "POST the raw, full MIME message" in the inbound parse webhook address options.