Skip to content

Instantly share code, notes, and snippets.

View alex-phillips's full-sized avatar

Alex Phillips alex-phillips

  • Raleigh, NC
View GitHub Profile
@jpriebe
jpriebe / del_vpc.py
Last active February 3, 2023 22:08
#!/usr/bin/env python3
#### borrowed heavily from https://stackoverflow.com/questions/53519058/how-to-delete-vpc-with-all-its-dependencies-using-boto3
#### also found this online: https://github.com/jeffbrl/aws-vpc-destroy/blob/master/vpc_destroy.py
import boto3
import json
import re
import sys
from pprint import pprint
@gjreasoner
gjreasoner / README.md
Last active April 1, 2026 09:39
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@ilude
ilude / !proxmox_k3s_cluster.sh
Last active August 21, 2024 11:03
Proxmox k3s cluster creation scripts
#!/bin/bash
# curl -s https://gist.githubusercontent.com/ilude/457f2ef2e59d2bff8bb88b976464bb91/raw/cluster_create_setup.sh?$(date +%s) > ~/bin/setup_cluster.sh; chmod +x ~/bin/setup_cluster.sh; setup_cluster.sh
echo "begin cluster_create_setup.sh"
export CREATE_TEMPLATE=1 #false
while test $# -gt 0; do
case "$1" in
--template)
export CREATE_TEMPLATE=0 #true
@christopher-hopper
christopher-hopper / README.md
Last active March 17, 2026 16:34
macOS Zscaler stop | disable Zscaler on mac

Disable macOS Zscaler

The following script can be used to disable Zscaler on macOS. Zscaler is corporate spyware and security software that controls access to Internet resources and spoofs TLS certificates to allow inspection of encrypted communications on corporate managed computers.

This script will not uninstall the Zscaler software.

@IcyEyeG
IcyEyeG / wmd2git.pl
Created October 20, 2019 11:08
Storing a wayback-machine-downloader website in a git repository
#!/usr/bin/perl
#This is a perl script intended to be used with a JSON file generated by https://github.com/hartator/wayback-machine-downloader and aims to convert an entire website archived with the wayback machine into a git repository with commits that correspond to a modification in a snapshot file.
#Some limitations of wayback-machine-downloader are dealt with, making this script quite slow:
# - wget is used so files are downloaded with proper modification timestamp
# - HTML files are scraped from their embeded Internet Archive code and links
# - duplications are found and discarded using MD5 comparison
#This is just a proof of concept that only works in Linux and it uses quite a few hacks to get it done
#If you want to convert or port this concept into a project, please follow GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html)
@ironicbadger
ironicbadger / convert.sh
Last active September 3, 2018 15:44
automated audiobook DRM stripping
#!/bin/bash
# ./convert -a asdfghjk
# Obtain an activation_bytes string and plug it into this script with -a.
FILES=aax/*
OUTPUT=mp3
while getopts a: option
do
case "${option}"
@bradwilson
bradwilson / .gitconfig
Last active January 22, 2023 21:51
~/.config/git/config
[user]
name = Brad Wilson
email = dotnetguy@gmail.com
signingkey = 0B7BD15AD1EC5FDE
[alias]
a = add -A
abort = rebase --abort
amend = commit --amend -C HEAD
bclean = "!f() { git switch ${1-main} && git branch --merged ${1-main} | grep -v ${1-main}$ | xargs git branch -d; }; f"
bdone = "!f() { git switch ${1-main} && git up && git bclean ${1-main}; }; f"
@jcouyang
jcouyang / README.org
Last active July 3, 2025 21:22
Promise All with Limit of Concurrent N

The Promise All Problem

in case of processing a very large array e.g. Promise.all(A_VERY_LARGE_ARRAY_OF_XHR_PROMISE)

which would probably blow you browser memory by trying to send all requests at the same time

solution is limit the concurrent of requests, and wrap promise in thunk

Promise.allConcurrent(2)([()=>fetch('BLAH1'), ()=>fetch('BLAH2'),...()=>fetch('BLAHN')])

@brennanMKE
brennanMKE / hero.ts
Last active March 19, 2026 17:42
Example of Mongoose with TypeScript and MongoDb
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;
@steve-jansen
steve-jansen / README.md
Last active March 16, 2026 15:27
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep