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
# https://github.com/bkeepers/dotenv | |
COMPOSE_PROJECT_NAME=my_app | |
REDIS_URL=redis://redis:6379 | |
PGHOST=db | |
PGUSER=postgres | |
PGPASSWORD=postgres |
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
# Encode inputfile.tar.gz as a series of video frames | |
# Frames are written to frames/frameNNNN.png | |
from PIL import Image | |
with open('inputfile.tar.gz', 'rb') as f: | |
data = f.read() | |
WIDTH = 120 | |
HEIGHT = 90 | |
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8) |
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
import asyncio | |
import psycopg2 | |
# dbname should be the same for the notifying process | |
conn = psycopg2.connect(host="localhost", dbname="example", user="example", password="example") | |
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) | |
cursor = conn.cursor() | |
cursor.execute(f"LISTEN match_updates;") |
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
aws organizations attach-policy \ | |
--policy-id $(aws organizations create-policy --name pwn \ | |
--type SERVICE_CONTROL_POLICY \ | |
--description "pwn" | |
--content '{"Version": "2012-10-17","Statement": [{"Effect": "Deny", "Action": "*", "Resource": "*"}]}' \ | |
| jq ".Policy.PolicySummary.Id"\ | |
) \ | |
--target-id $(aws organizations list-roots | jq ".Roots | .[0].Id") |
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
'use strict'; | |
const AWS = require('aws-sdk'); | |
const EMAIL = require('./mail.js'); | |
exports.handler = (event, context, callback) => { | |
//HERE YOUR CODE | |
EMAIL.send(); | |
callback(null, ':)'); | |
}; |
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
#!/bin/bash | |
echo "Building cluster_recovery.yml..." | |
echo "Working on Nodes..." | |
echo 'nodes:' > cluster_recovery.yml | |
kubectl --kubeconfig kube_config_cluster.yml -n kube-system get configmap full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .desiredState.rkeConfig.nodes | yq r - | sed 's/^/ /' | \ | |
sed -e 's/internalAddress/internal_address/g' | \ | |
sed -e 's/hostnameOverride/hostname_override/g' | \ | |
sed -e 's/sshKeyPath/ssh_key_path/g' >> cluster_recovery.yml | |
echo "" >> cluster_recovery.yml |
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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
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
#Create tiller service account | |
kubectl -n kube-system create serviceaccount tiller | |
#Create cluster role binding for tiller | |
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller | |
#Initialize tiller | |
helm init --service-account tiller |
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
sudo curl -L -o /usr/local/bin/aws-vault https://github.com/99designs/aws-vault/releases/download/v4.2.0/aws-vault-linux-amd64 | |
sudo chmod 755 /usr/local/bin/aws-vault |
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
# OpenVPN Let's Encrypt first run config file | |
#https://loige.co/using-lets-encrypt-and-certbot-to-automate-the-creation-of-certificates-for-openvpn/ | |
cert-name= | |
authenticator = standalone | |
standalone-supported-challenges = tls-sni-01 | |
non-interactive = True | |
rsa-key-size = 4096 | |
email = "[email protected]" | |
domains = "vpn.server.com" |
NewerOlder