Skip to content

Instantly share code, notes, and snippets.

View rglidden's full-sized avatar

Richard Glidden rglidden

View GitHub Profile
@rglidden
rglidden / .bashrc
Last active May 6, 2025 17:31
Useful commands for setting up Ubuntu in WSL for GitHub / Terraform development
# -------------------
# Begin Customization
# -------------------
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
@rglidden
rglidden / update-repos.sh
Last active September 23, 2024 13:37
A script to clone / pull all (first 1000) repos belonging to an organization (`brocksolutions`), stashing any work in progress before updating the default branch.
#!/bin/bash
# Get list of repos and default branches in the format "repo,branch"
repos=$(gh repo list brocksolutions --json "name,defaultBranchRef" -L 1000 -q ".[] | [.name, .defaultBranchRef.name] | @csv" | tr -d \" | sort)
# Iterate over each repo and branch
echo "$repos" | while IFS=, read -r repo branch; do
echo "--------------------------------------------------------------------------------"
echo "Updating $repo:$branch..."
echo "--------------------------------------------------------------------------------"
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n allowGlobalConfirmation
choco install 7zip.install /y
choco install filezilla /y
choco install Firefox /y
choco install git --params "/GitOnlyOnPath /WindowsTerminal /SChannel" /y
choco install GoogleChrome /y
choco install ilspy /y
choco install InkScape /y