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 | |
# This script cleans all cache for Microsoft Teams on Linux | |
# Tested on Ubuntu-like, Debian by @necrifede, Arch Linux by @lucas-dclrcq and Manjaro with flatpak by @danie1k. Feel free to test/use in other distributions. | |
# Tested Teams via snap package. | |
# Tested Teams via flatpak package. | |
# | |
# How to use in terminal: | |
# ./clear_cache_MS_Teams.sh ( deb-stable | deb-insider | snap | flatpak ) | |
# or |
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 | |
# | |
# https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/ | |
# | |
# Usage: source ~/bin/awssessiontoken | |
# arn:aws:iam::12345689012:mfa/ExampleMFADevice | |
mfa_arn=$(aws iam list-mfa-devices --query 'MFADevices[].SerialNumber' --output text) | |
echo "MFA ARN: $mfa_arn" | |
echo -n "Enter MFA Code: " |
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 | |
# This script will delete *all* documents in a CloudSearch domain. | |
# USE WITH EXTREME CAUTION | |
# Note: depends on the AWS CLI SDK being installed, as well as jq | |
# For jq, see: https://stedolan.github.io/jq/ and https://jqplay.org/ | |
if [[ ! $# -eq 2 || $1 != "--doc-domain" || ! $2 =~ ^https://.*$ ]]; then | |
echo "Must define --doc-domain argument (e.g. --doc-domain https://somedomain.aws.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
# Add field | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
# { | |
# "hello": "world", | |
# "foo": "bar" | |
# } | |
# Override field value | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
{ |
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 | |
# File name | |
readonly PROGNAME=$(basename $0) | |
# File name, without the extension | |
readonly PROGBASENAME=${PROGNAME%.*} | |
# File directory | |
readonly PROGDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | |
# Arguments | |
readonly ARGS="$@" |