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
# add self-signed certs on mac | |
mkdir -p /etc/docker/certs.d/c-cc40f9415b962ddb.elb.cn-northwest-1.amazonaws.com.cn\:8500 | |
cp ca.crt /etc/docker/certs.d/c-cc40f9415b962ddb.elb.cn-northwest-1.amazonaws.com.cn\:8500/ | |
security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt | |
# Kube get image versions currently running | |
kubectl get deployments -o wide |
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
# Simplest way I know to summarise a list of subnets | |
import netaddr as ip | |
ips = [ip.IPNetwork(line.rstrip('\n')) for line in open('ip_prefixes2')] | |
ip.cidr_merge(ips) | |
# More info at https://netaddr.readthedocs.io/en/latest/ |
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
# When that vendor says the server just powered off all of the sudden. | |
grep Power /var/log/messages | |
Aug 31 11:17:46 my_server systemd-logind: Power key pressed. | |
Aug 31 11:17:46 my_server systemd-logind: Powering Off... |