I hereby claim:
- I am ollytheninja on github.
- I am oliverewert (https://keybase.io/oliverewert) on keybase.
- I have a public key ASCpu8NNJTOI8ZsBp5Wa7cUFtBPZwN9HEBf9Kq6P0aB_8Qo
To claim this, I am signing this object:
| curl -fsSL https://tailscale.com/install.sh | sh | |
| sudo tailscale up --advertise-tags=tag:server --ssh --accept-routes | |
| sudo tailscale up --advertise-routes=10.1.0.0/24 --advertise-exit-node --advertise-tags=tag:server,tag:demo --ssh --accept-routes |
| # When you need to remove a tag from a bunch of Terraform | |
| find . -type f -name "*.tf" -exec sed -i -e '/^.*git_commit.*$/d' {} \; | |
| # Probably want to delete the "-e" files that were created for all files that didn't have the tag in them | |
| find . -type f -name "*.tf-e" -delete |
| import boto3 | |
| import botocore | |
| def validate_key(id, secret): | |
| sts = boto3.client('sts', aws_access_key_id=id, aws_secret_access_key=secret) | |
| try: | |
| identity = sts.get_caller_identity() | |
| print('Identity ARN: ' + identity['Arn']) | |
| except botocore.exceptions.ClientError as e: |
| import boto3 | |
| from botocore.exceptions import ClientError | |
| def invalidate_key(id, secret): | |
| iam = boto3.client('iam', aws_access_key_id=id, aws_secret_access_key=secret) | |
| try: | |
| iam.update_access_key( | |
| AccessKeyId=id, |
| # Requires kubernetes and Helm v3 installed | |
| # Install using Helm chart | |
| helm repo add anchore https://charts.anchore.io | |
| helm install anchore-1 anchore/anchore-engine | |
| # Connect to cli | |
| kubectl exec service/anchore-1-anchore-engine-api -it /bin/bash |
| # iptables dance, probably needs reviewing | |
| iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE | |
| iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
| iptables -A INPUT -m state --state NEW -i eth0 -j ACCEPT | |
| iptables -P INPUT DROP | |
| iptables -A FORWARD -i wlan0 -o wlan0 -j REJECT | |
| # Show ip tables | |
| iptables -L -v -n | |
| iptables -S |
| import os | |
| output_file = "card_pairs.csv" | |
| magic_number = 4 | |
| if output_file not in os.listdir('.'): | |
| with open(output_file, "w") as f: | |
| f.write("id_number,card_serial\n") | |
| while 1: |
| mkvirtualenv aws2 | |
| workon aws2 | |
| pip install -e git://github.com/boto/botocore.git@v2#egg=botocore | |
| pip install -e git://github.com/aws/aws-cli.git@v2#egg=awscli | |
| alias aws2='python -m awscli' |
I hereby claim:
To claim this, I am signing this object: