curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
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
#!/usr/bin/env bash | |
##################################################################### | |
# REFERENCES | |
# - https://cloud.google.com/secret-manager/docs/create-secret-quickstart | |
# - https://cloud.google.com/secret-manager/docs/manage-access-to-secrets | |
# - https://cloud.google.com/secret-manager/docs/creating-and-managing-expiring-secrets | |
# - https://cloud.google.com/secret-manager/docs/secret-rotation | |
# - https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances | |
# - https://cloud.google.com/iam/docs/best-practices-service-accounts#single-purpose |
Based on this article
ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does
This script can be copy paste to ssh as is. No hands installation. :-)
yum install zsh -y
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
AbortDocumentVersionUpload | |
AbortEnvironmentUpdate | |
AbortMultipartUpload | |
AbortVaultLock | |
AcceptAccountMapping | |
AcceptCertificateTransfer | |
AcceptDelegate | |
AcceptDirectConnectGatewayAssociationProposal | |
AcceptFxPaymentCurrencyTermsAndConditions | |
AcceptHandshake |
Python parser class for CloudTrail event archives, previously dumped to an S3 bucket. Class provides an iterator which will:
- Scan a given directory for archive files matching the required pattern.
- Decompress each archive in memory.
- Parse JSON payload and return each event in turn.
Parser contained in cloudtrailparser.py
, with timezone.py
used as a simple datetime.tzinfo
concrete class implement to provide UTC timezone.
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
from dns.resolver import Resolver | |
# make a system resolver using /etc/resolv.conf | |
sys_r = Resolver() | |
dns = ['ns1.dreamhost.com', 'ns2.dreamhost.com', 'ns3.dreamhost.com'] | |
dreamhost_dns = [ item.address for server in dns for item in sys_r.query(server) ] | |
# a resolver using dreamhost dns server | |
dreamhost_r = Resolver() |
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
# Sort a list of dictionary objects by a key - case sensitive | |
from operator import itemgetter | |
mylist = sorted(mylist, key=itemgetter('name')) | |
# Sort a list of dictionary objects by a key - case insensitive | |
mylist = sorted(mylist, key=lambda k: k['name'].lower()) |