Skip to content

Instantly share code, notes, and snippets.

View lordjabez's full-sized avatar
🔧
https://makingofthings.com

Judson Neer lordjabez

🔧
https://makingofthings.com
View GitHub Profile
@lordjabez
lordjabez / connect-to-vpn
Created October 24, 2024 19:05
Use openconnect to log into a Cisco-compatible VPN
#!/usr/bin/env bash
set -e
# Prerequisites:
# brew install openconnect xmlstarlet
# pip install keyring
# curl https://raw.githubusercontent.com/sailfishos-mirror/openconnect/refs/heads/master/trojans/csd-post.sh
# keyring set HOSTNAME USERNAME
# Usage:
@lordjabez
lordjabez / aws-account-actions.py
Created November 2, 2024 02:21
Do a thing across all AWS accounts in an organization
#!/usr/bin/env python3
import boto3
orgs_client = boto3.client('organizations')
sts_client = boto3.client('sts')
@lordjabez
lordjabez / update-domains.py
Created December 15, 2024 03:19
Bulk update domains in Route 53
#!/usr/bin/env python3
import boto3
import time
route53_client= boto3.client('route53domains')
response = route53_client.list_domains(MaxItems=100)
@lordjabez
lordjabez / terraform-docker
Created December 25, 2024 00:55
Run terraform in Docker
#!/bin/bash -e
TF_VERSION=1.1.6
docker run -i -t --platform linux/amd64 -e AWS_PROFILE="$AWS_PROFILE" -v "$HOME/.aws":/root/.aws -v "$PWD":/mnt -w /mnt "hashicorp/terraform:$TF_VERSION" $@
@lordjabez
lordjabez / restart-network.bash
Last active February 3, 2025 01:06
Restart network on MacOS
#!/usr/bin/env bash
set -e
# Run with sudo
ifconfig en0 down
route flush
ifconfig en0 up
dscacheutil -flushcache