Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
# install dependencies
sudo apt-get update
sudo apt-get install -y iproute2 iptables iputils-ping dnsutils wget
# download wsl-vpnkit and unpack
VERSION=v0.4.1
wget https://github.com/sakai135/wsl-vpnkit/releases/download/$VERSION/wsl-vpnkit.tar.gz
@joesturge
joesturge / backfill-releases-from-keep-a-changelog.sh
Last active November 29, 2024 14:54
Backfill the releases of a git repo using the changelog.md in a keepachangelog format
#!/bin/bash
# Configuration
CHANGELOG_PATH="CHANGELOG.md"
REPO="your-repo-name" # Replace with your repository name
# Dry run flag
DRY_RUN=true
# Authenticate to GitHub (only needed if not authenticated with `gh` CLI)
@joesturge
joesturge / count.sh
Created September 19, 2024 13:09
Count the number of merged dependabot PRs per member of a github team
#!/bin/bash
# Check for arguments
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <team-url>"
exit 1
fi
# Extract organization and team slug from the URL
TEAM_URL=$1
@joesturge
joesturge / run-speedtest.sh
Created June 10, 2022 18:31
Script to run speedtest on asus merlin router and push results to a google form
#!/usr/bin/env bash
# Download and untar https://install.speedtest.net/app/cli/ookla-speedtest-1.1.1-linux-aarch64.tgz
TIMESTAMP=$(date +%s)
echo running speedtest at $TIMESTAMP
RESULTS=$(/tmp/home/root/speedtest --format=csv | awk -F, '{print $3, $6, $7}' | sed 's/"//g' | awk '{print $1, $2/125000, $3/125000}');