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
| /*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
| that detects and handles AJAXed content. | |
| Usage example: | |
| waitForKeyElements ( | |
| "div.comments" | |
| , commentCallbackFunction | |
| ); |
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
| #!/usr/bin/env bash | |
| PROFILE=${PROFILE:-my-profile-to-use} | |
| AWS=/opt/homebrew/bin/aws | |
| SSO_ACCOUNT=$($AWS sts get-caller-identity --query "Account" --profile "$PROFILE") | |
| # kill existing pending sessions | |
| pgrep -f 'aws sso login' | xargs kill | |
| if [ ${#SSO_ACCOUNT} -eq 14 ]; then # 14 because 2 quotes + 12-digit account number | |
| exit 0 |
OlderNewer