Skip to content

Instantly share code, notes, and snippets.

View jakebrinkmann's full-sized avatar

Jake Brinkmann jakebrinkmann

View GitHub Profile
@jakebrinkmann
jakebrinkmann / Dockerfile
Created February 12, 2021 20:03
Pdf2HTML
FROM ubuntu
RUN apt-get update && apt-get install poppler-utils -y
@jakebrinkmann
jakebrinkmann / colors.md
Last active February 27, 2023 16:09
Hex colors of the weeks, year 2021
Week Date Season Hex Color Thumbnail
01 01/01/21 WINTER #A8D2F1
02 01/08/21 WINTER #98C3EE
03 01/15/21 WINTER #87B4EB
04 01/22/21 WINTER #76A5E7
05 01/29/21 WINTER #6596E4
06 02/05/21 WINTER #5486E1
07 02/12/21 WINTER #4377DD
08 02/19/21 WINTER #3368DA
@jakebrinkmann
jakebrinkmann / fix_wsl_2_vpn.md
Created November 17, 2020 14:34
Fix the Pulse Secure VPN HTTPS issue inside WSL 2

This is my solution for:

Pulse Secure VPN

  1. PowerShell: netsh interface ipv4 show subinterface
  2. WSL2: ip link list
  3. WSL2: sudo ip link set dev eth0 mtu 1400

Notes

@jakebrinkmann
jakebrinkmann / poly_schema.py
Created November 10, 2020 17:24
Simple Polymorphic Marshmallow Schema in Python
from marshmallow import Schema, ValidationError, fields, validate
REQ = dict(required=True, allow_none=False) # Make a field required
class KeysSchema(Schema):
item_id = fields.String(**REQ)
class Schema1(Schema):
@jakebrinkmann
jakebrinkmann / filter-log-events.sh
Last active October 7, 2021 20:21
Combine AWS CloudWatch logs into a single stream from multiple sources when a CloudWatch Alarm goes off (python, boto3)
#!/usr/bin/env bash
[[ ! -z "${DEBUG}" ]] && set -x
LOG_GROUP_NAME=${1-} # API-ResourceFunction
MY_QUERY="${@:2}"
START_TIME=$(date --date="30 minutes ago" "+%s000")
END_TIME=$(date "+%s000")
if [ -z "${LOG_GROUP_NAME}" ]; then
@jakebrinkmann
jakebrinkmann / rename_virtualenv.bash
Created October 22, 2020 21:20
rename/move a virtualenv to a venv (Python)
VENV1=".virtualenv"
VENV2=".venv" # <-- RENAME THEM ALL TO THIS
PYTHON="${PYTHON:-python3.8}"
MYDIR=$(PWD);
for x in $(find . -name $VENV1 -type d); do
cd "$MYDIR/$(basename $x)";
@jakebrinkmann
jakebrinkmann / sqla-guid-array.py
Last active November 3, 2020 17:40 — forked from mvantellingen/sqla-guid-array.py
SQLAlchemy INET Array
import datetime
import uuid
import psycopg2.extras
from sqlalchemy import Column, MetaData, Table
from sqlalchemy.types import Integer, DateTime, TypeDecorator
from sqlalchemy.dialects.postgresql import ARRAY, array
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.sql.expression import cast, literal, select
@jakebrinkmann
jakebrinkmann / profile.json
Last active November 23, 2021 14:05
Windows Terminal (settings.json) Profile
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command":
@jakebrinkmann
jakebrinkmann / 0_README.md
Last active May 27, 2020 14:57
Webpack VS Code React Chrome Debugger
@jakebrinkmann
jakebrinkmann / dev_to_staging_summary.sh
Created March 31, 2020 23:12
dev to staging script (local merge request summary)
#!/usr/bin/env bash
clear
BRANCH1=${1:-development}
BRANCH2=${2:-staging}
TIMEBOX=${3:-3 weeks ago}
cmd() {
git --no-pager log \
--color --abbrev-commit --author-date-order --since="$TIMEBOX" \