Skip to content

Instantly share code, notes, and snippets.

View abraithwaite's full-sized avatar
:shipit:
:(){ :|:& };:

Alan Braithwaite abraithwaite

:shipit:
:(){ :|:& };:
View GitHub Profile
@abraithwaite
abraithwaite / gh-dl-release
Last active February 9, 2023 17:22 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/bin/bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@abraithwaite
abraithwaite / git-reach-branch
Created February 28, 2024 03:18
git-read-branch
function git-read-branch() {
git ls-tree -r $1 | grep $2 | awk '{print $3}' | xargs git cat-file blob
}
@abraithwaite
abraithwaite / aws-run.sh
Last active February 26, 2025 19:22
A script to run commands as a given profile using IAM Identity Center (SSO) profiles.
#!/bin/bash -e
# aws-run
# Usage: aws-run <profile-name> -- <command>
#
# To use this script with AWS IAM Identity Center user credentials, follow this guide:
# https://docs.aws.amazon.com/singlesignon/latest/userguide/howtogetcredentials.html#how-to-get-temp-credentials-automatic
#
# When asked for the CLI profile name, choose one that you don't mind typing
# every time you run a command.