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 bash | |
set -e | |
# Run with sudo | |
ifconfig en0 down | |
route flush | |
ifconfig en0 up | |
dscacheutil -flushcache |
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/bash -e | |
TF_VERSION=1.1.6 | |
docker run -i -t --platform linux/amd64 -e AWS_PROFILE="$AWS_PROFILE" -v "$HOME/.aws":/root/.aws -v "$PWD":/mnt -w /mnt "hashicorp/terraform:$TF_VERSION" $@ |
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 boto3 | |
import time | |
route53_client= boto3.client('route53domains') | |
response = route53_client.list_domains(MaxItems=100) |
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 boto3 | |
orgs_client = boto3.client('organizations') | |
sts_client = boto3.client('sts') | |
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 bash | |
set -e | |
# Prerequisites: | |
# brew install openconnect xmlstarlet | |
# pip install keyring | |
# curl https://raw.githubusercontent.com/sailfishos-mirror/openconnect/refs/heads/master/trojans/csd-post.sh | |
# keyring set HOSTNAME USERNAME | |
# Usage: |
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
from bottle import request, route, run, redirect | |
redirect_url = 'https://example.com/foo | |
@route('/foo') | |
def job(): | |
requestor_id = request.query['requestor_id'] | |
print(f'{requestor_id} clicked the link') | |
redirect(redirect_url) |
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 bash | |
set -e | |
BUCKETNAME=$1 | |
aws s3api list-multipart-uploads --bucket $BUCKETNAME \ | |
| jq -r '.Uploads[] | "--key \"\(.Key)\" --upload-id \(.UploadId)"' \ | |
| while read -r line; do | |
eval "aws s3api abort-multipart-upload --bucket $BUCKETNAME $line"; | |
done |
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 contextlib | |
import os | |
import sys | |
import cachier | |
import feedparser | |
import keyring |
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 bottle | |
@bottle.route('<path:path>', method=['GET', 'POST', 'PUT', 'PATCH']) | |
def echo(path): | |
return bottle.request.body | |
bottle.run(host='localhost', port=8080) |
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 datetime | |
import sys | |
import cachier | |
import feedparser | |
import pandas | |
import requests |
NewerOlder