- autoscroll - add middle click scroll button
- behindtheoverlay - remove overlayed popups
- duplicate tab shortcut key
- go back with backspace
- one tab - flattens tabs into a single tab with links
- session buddy - saves one session for shopping, another for work, etc
- tab to window/popup - keyboard shortcut
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
| #!/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') |
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
| # 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 | |
| } | |
| } |
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
| -- 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 |
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 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 |
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
| #!/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" |
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
| #!/bin/sh | |
| aws s3api get-bucket-policy --bucket site-region-config-dev | jq -r .Policy | jq |
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
| #!/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" |
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
| # 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` |
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"