service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval
(in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled
(true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags
(comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol
(http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled
(true|false)
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 | |
# Set script to exit on error | |
set -e | |
# Enable logging | |
exec > >(tee -i /var/log/setup-script.log) | |
exec 2>&1 | |
echo "Starting script execution..." |
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
# don't copy paste this into your config. It's tailored to me and I haven't really stress-tested it outside of my own use. Also, I was mostly using this in 2017-2019 and features may have changed. | |
# Some plugins have been retired and I haven't migrated yet. copyartifacts is the best example of this. | |
# Just use this as a starting point to learn about advanced, undocumented/poorly-documented features of beets. | |
directory: e:\Music\ | |
library: e:\Music\beetslibrary.bib | |
#copyartifactspy3 chroma scrub |
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
# you will need to alias the internal kube IPs to your loopback interface | |
# get pods with IPs | |
kubectl get pods -n kafka -o wide | |
# add aliases | |
sudo ifconfig lo0 100.101.168.109 alias | |
sudo ifconfig lo0 100.117.38.251 alias | |
sudo ifconfig lo0 100.121.158.154 alias |
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
// Class encompasing the state and logic needed to serve a request. | |
class CallDataBase { | |
public: | |
// Take in the "service" instance (in this case representing an asynchronous | |
// server) and the completion queue "cq" used for asynchronous communication | |
// with the gRPC runtime. | |
CallDataBase(Greeter::AsyncService* service, ServerCompletionQueue* cq) | |
: service_(service), cq_(cq), status_(PROCESS) {} | |
virtual ~CallDataBase() {} |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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
# Finds all maximal cliques in a graph using the Bron-Kerbosch algorithm. The input graph here is | |
# in the adjacency list format, a dict with vertexes as keys and lists of their neighbors as values. | |
# https://en.wikipedia.org/wiki/Bron-Kerbosch_algorithm | |
from collections import defaultdict | |
def find_cliques(graph): | |
p = set(graph.keys()) | |
r = set() | |
x = set() |