Skip to content

Instantly share code, notes, and snippets.

View aflansburg's full-sized avatar
🔧

Abe Flansburg aflansburg

🔧
View GitHub Profile
@aflansburg
aflansburg / README.md
Last active July 22, 2024 19:22
checking for changes between release tags with paths-filter

Check for changes in Hasura metadata & migrations between GH releases

What

Checks for changes to local hasura metadata and migration files. This workflow would run on your main / default branch and detect changes.

You could then run hasura migrate apply or hasura metadata apply conditionally based on these changes.

Setup

  1. Install act: https://nektosact.com/installation/index.html
  2. Place the workflow in the appropriate place in your project under `.github/workflows/hasura-changes-since-release.yml
@aflansburg
aflansburg / wport.sh
Created July 1, 2024 21:03
"wport" - tells you ports that are LISTENing or checks a specific port
# add to ~/.zhsrc
# run source ~/.zshrc
# run w/ `wport` or `wport <port>`
function wport(){
if [ "$1" = "help" ] || [ "$1" = "-h" ]; then
echo "Usage: wport [port]"
echo "Without a port argument, list all ports that are currently being listened to."
echo
echo "If a port is provided, list only the port that is being listened to."
echo
@aflansburg
aflansburg / commands.sh
Created April 24, 2023 19:58
EC2-Helpful-AWS-Commands
# List all provisioned IP addresses for a subnet
aws ec2 describe-network-interfaces \
--filters Name=subnet-id,Values=<subnet id> \
| jq -r '.NetworkInterfaces[].PrivateIpAddress' | sort
@aflansburg
aflansburg / _.sh
Created March 3, 2023 18:43
Basic jq w/ dynamic keys example with kubectl
# want to decode the output of the `kubectl get secret secname` command
# and specifically the `auth` value
# when we maybe don't know the value of the key corresponding to a container registry
# {
# "auths": {
# "https://index.docker.io/v1/": {
# "username": "smittywerbenjagermanjensen",
# "password": "sup3rs3cr3t",
# "email": "swjmjensen12345@example.com",
# "auth": "c21pdHR5d2VyYmVuamFnZXJtYW5qZW5zZW46c3VwM3JzM2NyM3QK"
@aflansburg
aflansburg / keybase.md
Created August 29, 2022 20:01
keybase.md

Keybase proof

I hereby claim:

  • I am aflansburg on github.
  • I am aflansburg (https://keybase.io/aflansburg) on keybase.
  • I have a public key ASDRD9OAl-WrrItDis5f65_Hcj4uVQIz9hP0_8jKRtOz6wo

To claim this, I am signing this object:

@aflansburg
aflansburg / dd_excludes.json
Created April 20, 2022 19:53
Inject `dd-privacy-hidden` tag into specific inputs and inputs with autocomplete attribute
{
"exclusions": [
"email",
"firstName",
"lastName",
"phoneNumber",
"street1",
"street2",
"city",
"state",
@aflansburg
aflansburg / redact.js
Created April 8, 2022 14:53
Simple Redact/Hide/Obscure/Mask text content on page with JS
/* Finds text content in some element and redacts it
with the provided mask value
*/
function redactContent(textValue, tagType, maskValue){
for (const tag of document.querySelectorAll(tagType)) {
if (tag.textContent.includes(textValue)) {
tag.textContent = maskValue;
}}
}
@aflansburg
aflansburg / imports.py
Created September 15, 2021 14:07
standard_jupyter_notebook_imports
# import initial libs to do EDA
import pandas as pd
import numpy as np
import random
# viz libs
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
%matplotlib inline
@aflansburg
aflansburg / gist:f9a04ee5258b34d4cdd2ab63a6fc327b
Created September 2, 2021 20:52
Cyberpunk 2077 iTerm2 Profile + Colors
{
"Ansi 5 Color" : {
"Red Component" : 0.022819328308105468,
"Color Space" : "sRGB",
"Blue Component" : 0.8666666666666667,
"Alpha Component" : 1,
"Green Component" : 0.83805519318199617
},
"Tags" : [
@aflansburg
aflansburg / extract_runtime.py
Created August 5, 2021 14:46
Check GridSearchCV fit Runtime
# import time - not the abstract construct of 'time'
# but rather a library built into Python for
# dealing with time
from time import time
# ML stuff
ada_tuned_clf = AdaBoostClassifier(random_state=1)
# some canned params for hypertuning
parameters = {