Skip to content

Instantly share code, notes, and snippets.

View Kirizan's full-sized avatar

Nick Kirby Kirizan

  • Elevance Health
  • Indianapolis, IN
View GitHub Profile
@sebsto
sebsto / assume_root_credentials.sh
Last active March 20, 2025 12:28
Assume Root on AWS member accounts
#!/bin/bash
AWS_ACCOUNT_ID=012345678901
# Check if jq is installed
if ! command -v jq &> /dev/null; then
echo "Error: jq is not installed. Please install jq to parse JSON."
exit 1
fi
@lukewhitehouse
lukewhitehouse / setup-plantuml.md
Last active March 24, 2025 02:48
How to setup and install PlantUML on Mac OSX and VS Code with Homebrew

How to setup and install PlantUML on Mac OSX and VS Code with Homebrew

Documentation around PlantUML and how to setup (especially when you don't typically work in Java) leave a lot to be desired. Here's a quick run down of how to get plantuml setup and running so you can create, edit, preview and export the diagrams (including C4 Model) in VS Code.

First, ensure you have homebrew installed and updated: https://brew.sh/.

Install the temurin JDK, graphviz and plantuml in that order.

brew install --cask temurin
@flanger001
flanger001 / containers.js
Last active August 7, 2023 16:40
If you use Firefox Multi-Account Containers with Firefox sync, sometimes you will get a number of extra containers, even thousands of them. Run this in the devtools console in the Firefox containers section `about:preferences#containers`. Add your own container tags on line 48.
let removeContainers = (...containers) => {
let items, isValid, removeButtons;
items = document.querySelectorAll("#browserContainersGroupPane richlistitem");
isValid = (el) => typeof (el) != "undefined" || el != null;
removeButtons = [];
items.forEach((el, idx) =>
{
const hbox_1 = el.getElementsByTagName("hbox").item(0);
@craigw
craigw / aws_delete-default-vpc.sh
Last active March 3, 2025 12:36 — forked from jokeru/aws_delete-default-vpc.sh
Script to delete all AWS default VPCs from all regions using AWS CLI
#!/usr/bin/env bash
set -euo pipefail
for AWS_REGION in $(aws ec2 describe-regions --region eu-west-1 --query '[Regions[].RegionName]' --output text); do
echo -n "* Region ${AWS_REGION}: "
export AWS_REGION
# get default vpc
vpc=$(aws ec2 describe-vpcs --filter Name=isDefault,Values=true --query "Vpcs[0].VpcId" --output text)
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active May 2, 2025 13:16
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@gcollazo
gcollazo / keychain.py
Created March 8, 2014 16:35
Python methods to interact with Mac OS X Keychain
import re
import os
def getpassword(service, account):
def decode_hex(s):
s = eval('"' + re.sub(r"(..)", r"\x\1", s) + '"')
if "" in s: s = s[:s.index("")]
return s