Use ed25519 cipher because it's more secure.
The email is in Settings > Emails > Keep my email addresses private
ssh-keygen -f ~/.ssh/github -o -a 100 -t ed25519 -C "github_username@users.noreply.github.com"
| { | |
| "workbench.startupEditor": "newUntitledFile", | |
| "window.title": "${activeEditorLong}${separator}${rootName}", | |
| "editor.renderWhitespace": "all", | |
| "files.exclude": { | |
| "node_modules/": true | |
| }, | |
| "terminal.external.osxExec": "iTerm.app", | |
| "terminal.explorerKind": "external", | |
| "workbench.settings.editor": "json", |
Use ed25519 cipher because it's more secure.
The email is in Settings > Emails > Keep my email addresses private
ssh-keygen -f ~/.ssh/github -o -a 100 -t ed25519 -C "github_username@users.noreply.github.com"
| # use aws-get-name from https://gist.github.com/nitrocode/41924629833615efc1ab34945727732f | |
| # get /32 cidr ips using ripgrep | |
| ips=`rg '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/32' -ttf -o -I --no-line-number | sort -u` | |
| # TODO: below | |
| for ip in $ips; do | |
| # convert each ip to human readable name using the Name tag of the IP and append to an array | |
| $name=`aws-get-name $ip` |
| #!/bin/sh | |
| # source: https://stackoverflow.com/a/43532465/2965993 | |
| function aws-get-name() { | |
| aws ec2 describe-instances \ | |
| --filters "Name=network-interface.addresses.private-ip-address,Values=$2" | \ | |
| jq '.Reservations[].Instances[].Tags[] | select(.Key=="Name").Value' | |
| } | |
| aws-get-name "10.10.10.10" |
| #!/bin/sh | |
| aws s3api get-bucket-policy --bucket site-region-config-dev | jq -r .Policy | jq |
| #!/bin/sh | |
| REGION=us-east-1 | |
| INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id` | |
| function tag() { | |
| aws ec2 describe-tags --region "$1" \ | |
| --filters "Name=resource-id,Values=$2" \ | |
| --query 'Tags[?!contains(Key, `:`)].[Key,Value]' | \ | |
| jq -r "map( {(.[0]): .[1]} ) | add | .$3" |
| #!/usr/bin/env python3 | |
| import hashlib | |
| import hmac | |
| import base64 | |
| def verify_slack_request(event: dict, slack_signing_secret: str) -> bool: | |
| """Verify slack requests. | |
| Borrowed from https://janikarhunen.fi/verify-slack-requests-in-aws-lambda-and-python.html |
| -- source: https://stackoverflow.com/a/40195356 | |
| --- Check if a file or directory exists in this path | |
| function exists(file) | |
| local ok, err, code = os.rename(file, file) | |
| if not ok then | |
| if code == 13 then | |
| -- Permission denied, but it exists | |
| return true | |
| end | |
| end |
| # local vars | |
| locals { | |
| name = "hello" | |
| env = "dev" | |
| lb_name = join("-", list("TF", local.env, local.name)) | |
| zip_path = "${local.name}.zip" | |
| tags = { | |
| env = local.env | |
| } | |
| } |
| #!/bin/sh | |
| filepath=vault/prod/mysql/prod/dbcore-db-read/roles/read_only.sql | |
| diff \ | |
| <(git show origin/master:$filepath | tr ' ' '\n') \ | |
| <(git show origin/branch-name:$filepath | tr ' ' '\n') |