Skip to content

Instantly share code, notes, and snippets.

View andrewloux's full-sized avatar

Andrew Louis andrewloux

View GitHub Profile
@andrewloux
andrewloux / restart.sh
Created May 2, 2024 11:56
Restart all pods in K8s cluster
#!/bin/bash
## Usage: ./restart.sh --env staging
# Check if the --env argument is provided
if [ "$#" -ne 2 ] || [ "$1" != "--env" ]; then
echo "Usage: $0 --env <environment>"
exit 1
fi
@andrewloux
andrewloux / check.sh
Created May 28, 2024 14:22
Dump JAR Dependencies
#!/bin/bash
JAR_FILE=$1
EXTRACT_DIR="extracted"
# Ensure the extracted directory exists
mkdir -p $EXTRACT_DIR
# Extract the jar file
unzip -q "$JAR_FILE" -d $EXTRACT_DIR
@andrewloux
andrewloux / clicker.js
Created July 18, 2024 12:38
batch clicker
// Function to find and click links in batches based on custom selectors
function batchClickLinks(options = {}) {
const {
linkSelector = 'a[href*="https://download.net/file"]', // Updated default selector
rowSelector = 'body',
batchSize = 5,
delay = 5000,
excludeNumbers = []
} = options;