AWS Assume-Role requiring only aws-cli and jq
git clone https://gist.github.com/80306011bb5da80c765ffd6aa2ecf89b.git arole
#!/bin/bash | |
# The following line defines a bash function and is designed to be copy-pasta-ed into your terminal and used as shown on the last line of this file. I'm only putting it in a script to get it on gist | |
redir_test(){ curl -svLo /tmp/redir_test.out "$@" 2>&1 | grep -E '^(> Host|> GET|< HTTP|< location|[<>]\s*$)'; } | |
# BONUS: One super-useful use of this is to test your readiness to respond to future DNS changes. That can be done like so: | |
# redir_test -H 'Host: www.example.com' https://192.168.0.101/ | |
# This assumes that your server at 192.168.0.101 is set up to serve www.example.com and this simulates what `curl https://www.example.com/` would do if DNS returned 192.168.0.101 when doing a lookup on www.example.com | |
redir_test "$@" |
#! /usr/bin/env bash | |
hi_color=$(tput setaf 4) #blue | |
bold=$(tput bold) | |
underline=$(tput smul) | |
normal=$(tput sgr0) | |
read -r -d '' usage << DOC | |
Prints out a table of tmux sessons, windows, and panels. |
# SEE: https://github.com/tmux/tmux/blob/47923bd5f62f49924e20f3cabcff9350968449a2/CHANGES#L320-L323 | |
# FROM: https://github.com/tmux/tmux#from-version-control | |
tmux -V | |
cd ~/src/ | |
git clone https://github.com/tmux/tmux | |
cd tmux/ | |
sudo apt install bison make pkg-config autotools-dev automake libevent-dev libncurses-dev | |
sh autogen.sh |
#! /usr/bin/env bash | |
set -eu | |
_main(){ | |
input_file="$1" | |
file_path="$(realpath -s "$input_file")" | |
file_name="$(basename "$file_path")" | |
cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}")")" | |
cp "$file_path" ./ | |
git add "$file_name" |
Want to fork your own gists? No fork button? No problem! Install this user script by clicking refork.user.js' "raw" link down below: ⇓
configure-git-credential-hellper.sh
script