This file contains 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
#!/usr/bin/env bash -e | |
# How to use this script: | |
# 1. Follow these instructions to configure a single AWS account to do initial login with SSO | |
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html | |
# 2. Export AWS_PROFILE=... and then run "aws sso login" to get an SSO token | |
# 3. Once signed in with AWS SSO, run this script to automatically list out all the other accounts and roles and add them to your config file | |
# If you want to filter roles / accounts in the process, or validate config before committing it, you can customise the script to do this. |
This file contains 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
[ | |
{ | |
"core-site" : { | |
"fs.s3a.endpoint" : "s3.eu-central-1.amazonaws.com" | |
} | |
} | |
] |
This file contains 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
#!/usr/bin/env bash | |
for c in $(brew cask list); do | |
info=$(brew cask info ${c}) | |
installed_ver=$(echo "$info" | cut -d$'\n' -f1 | tr -d ' ' | cut -d':' -f 2) | |
current_ver=$(echo "$info" | cut -d$'\n' -f3 | cut -d' ' -f 1 | rev | cut -d'/' -f 1 | rev) | |
if [ "$installed_ver" != "$current_ver" ]; then | |
echo "## ${c} is installed '$installed_ver', current is '$current_ver'" | |
echo brew cask reinstall ${c} | |
fi |
This file contains 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
#!/usr/bin/env bash | |
(set -x; brew update;) | |
(set -x; brew cleanup;) | |
(set -x; brew cask cleanup;) | |
red=`tput setaf 1` | |
green=`tput setaf 2` | |
reset=`tput sgr0` |
This file contains 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 | |
checkusage() { | |
[[ $# -eq 0 ]] && err_exit 'Usage: diskcheck.sh DEVICE...' | |
} | |
checkperms() { | |
for disk in $@; do | |
local f="diskcheck.sh: ${disk}" | |
[[ -e ${disk} ]] || err_exit "${f}: No such file or directory" |
This file contains 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
# Put expressions that hit more files first. | |
/home/chroot/.* | |
/home/[^/]+/Workspaces?/.*/target/.* | |
/home/[^/]+/Workspaces?/.*/\.pants\.d.* | |
/home/[^/]+/\.m2/repository/.* | |
/home/[^/]+/\.ivy2/(?:cache|local|limiter)/.* | |
/home/[^/]+/.*(?:~|\.(?:log|tmp|bak|lock)) | |
/home/[^/]+/S3/.* | |
/home/[^/]+/Virtualization/Machines/.* |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |