This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function aws-sso-access-token() { | |
| find "$HOME/.aws/sso/cache" -type f ! -name 'botocore*' -exec jq -r '.accessToken' {} \; | head -n1 | |
| } | |
| function aws-sso-list-accounts() { | |
| aws sso list-accounts --access-token "$(aws-sso-access-token)" "$@" | |
| } | |
| function aws-sso-list-account-roles() { | |
| aws sso list-account-roles --access-token "$(aws-sso-access-token)" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # video demo - https://www.youtube.com/watch?v=Y8TyE_DNds8 | |
| mkdir ~/.tmp && cd $_ | |
| # install aws-cli v2 | |
| curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ | |
| unzip awscliv2.zip && \ | |
| sudo ./aws/install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import os | |
| import webbrowser | |
| from configparser import ConfigParser | |
| from datetime import datetime, timedelta, timezone | |
| from pathlib import Path | |
| import boto3 | |
| import dateutil | |
| from botocore import UNSIGNED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| knu = require("knu") -- https://github.com/knu/hs-knu | |
| -- Switch between Karabiner-Elements profiles as Barrier enters a different host | |
| do | |
| -- Configure Barrier (https://github.com/debauchee/barrier) to output log to ~/Library/Logs/barrier.log | |
| local logFile = os.getenv("HOME") .. "/Library/Logs/barrier.log" | |
| local lineNo = 1 | |
| local host = nil | |
| local defaultProfile = "Default" | |
| local profileForHost = function (host) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| knu = require("knu") -- https://github.com/knu/hs-knu | |
| -- Switch between Karabiner-Elements profiles as Barrier enters a different host | |
| do | |
| -- Configure Barrier (https://github.com/debauchee/barrier) to output log to ~/Library/Logs/barrier.log | |
| local logFile = os.getenv("HOME") .. "/Library/Logs/barrier.log" | |
| local lineNo = 1 | |
| local host = nil | |
| local defaultProfile = "Default" | |
| local profileForHost = function (host) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ $# != 2 ]; then | |
| echo "\nchris k's git update automater sh script. Edit to put a bunch of \`git add blah'" | |
| echo "lines in the body then evoke with the branch name and commit description\n" | |
| echo "Usage: $0 <branch_name> <\"Description of update\">\n" | |
| echo " branch_name: the name of the git branch to be created" | |
| echo " Description: Text for: git commit -m \"Description of update\"" | |
| echo "" | |
| echo "Example:" | |
| BRANCH="core_override" |