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 -euo pipefail | |
IFS=$'\n\t' | |
mapfile -t ids < <(mailq | grep -E '^[0-9A-F]' | awk '{print $1}') | |
for id in "${ids[@]}"; do | |
postcat -q "${id}" | less | |
echo "Remove? (y)" | |
read -r RM |
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 | |
curl -q http://169.254.169.254/latest/user-data |
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 -euo pipefail | |
IFS=$'\n\t' | |
# prune stale containers/images | |
docker image prune -f | |
# prune stale volumes | |
docker volume prune -f |
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 -euo pipefail | |
IFS=$'\n\t' | |
# get all my starred repos | |
getstars() { | |
query="query(\$endCursor: String) { | |
viewer { | |
starredRepositories(first: 100, after: \$endCursor) { |
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
# normal mtr with icmp | |
mtr $1 | |
# tcp | |
mtr -T -P 443 $1 |
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 | |
# install yawsso https://github.com/victorskl/yawsso | |
# make sure aws cli is installed | |
# call with `sso` | |
################################################################################ | |
# when calling these functions make sure AWS_PROFILE is set | |
################################################################################ |
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 -euo pipefail | |
IFS=$'\n\t' | |
key="ServiceEndpointWebsocket" | |
stack_name="sh-ws-demo-backend-dev" | |
aws cloudformation describe-stacks --stack-name "${stack_name}" \ | |
--query "Stacks[0].Outputs[?OutputKey=='${key}'].OutputValue" \ | |
--output text |
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 -euo pipefail | |
IFS=$'\n\t' | |
trap "exit" INT TERM ERR | |
trap "kill 0" EXIT | |
aws logs describe-log-groups \ | |
--log-group-name-prefix "/aws/lambda/sh-ws-demo-backend" \ | |
--query 'logGroups[].logGroupName' \ |
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
name: Generic Issue | |
description: Organized way of making actionable tasks for PMs, data scientists, leads, etc. | |
title: "[Generic]: " | |
labels: | |
body: | |
- type: checkboxes | |
id: Terms | |
attributes: | |
label: Guidelines | |
description: By submitting this issue, you agree to follow our [Contributing Guidelines](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). |
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
resource "aws_iam_openid_connect_provider" "github_actions" { | |
client_id_list = ["sts.amazonaws.com"] | |
thumbprint_list = ["6938fd4d98bab03faadb97b34396831e3780aea1"] | |
url = "https://token.actions.githubusercontent.com" | |
} | |
data "aws_iam_policy_document" "github_actions_assume_role_policy" { | |
statement { | |
actions = ["sts:AssumeRole"] |
NewerOlder