Discover gists
var isoCountries = { | |
'AF' : 'Afghanistan', | |
'AX' : 'Aland Islands', | |
'AL' : 'Albania', | |
'DZ' : 'Algeria', | |
'AS' : 'American Samoa', | |
'AD' : 'Andorra', | |
'AO' : 'Angola', | |
'AI' : 'Anguilla', | |
'AQ' : 'Antarctica', |
At this time proxmox backup only backs up VM and Containers - ths guide covers that.
What i didn't realize is the backup job is still defined on the cluster and PBS provides a new storage type that dedupes and managed all the vzdump files created - which is cool.
I decided to run proxmox backup on my Synology NAS where it has more reliable connection to the NAS (i.e. via memory) for doing deduple, garbage collection, prune, verification etc. However the steps here generally remain true.
Once again i used one of Derek Seaman's Awesome Blogs for the basis of this - but with my own tweaks (like using SMB instead of CIFS. As of 9/21 my tweaks are signifcnant, in the original blog it is missing steps to enable encoding acceleration in CTs and VMs.
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
WebSocket is a protocol over http. You should read: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API for more info on WebSocket.
Krunker uses msgpack for decoding and encoding packets. Msgpack is also smaller and sometimes faster depending on the implementation you use/make.
Like I said earlier, Krunker uses msgpack for decoding and encoding packets. A ping packet would like this: ["po"]
which you send when you get a ["pi"]
packet, and the ping result packet you receive is ["pir", ]
. For fetching a profile, you can use ["r", "profile", , null]
. The result packet would be like ["0", "profile", , , , , ...etc]
. For finding packets, you can download https://krunker.io/social.html using a command like cURL, formatting the file and lo
def get_github_token(app_id, pem_file, organization_slug, repository, private_key_file): | |
jwt = get_jwt_token(app_id, private_key_file) | |
installation = requests.get(f'https://api.github.com/orgs/{organization_slug}/installation', headers={'Authorization': f'Bearer {jwt}'}) | |
access_tokens_url = installation.json()['access_tokens_url'] | |
# values for the permissions are documented here: https://docs.github.com/en/rest/overview/permissions-required-for-github-apps | |
data = {'repository': repository, 'permission': {'contents': 'write'}} | |
token_request = requests.post(access_tokens_url, headers={'Authorization': f'Bearer {jwt}'}, json=data) | |
token = token_request.json()['token'] | |
return token |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
#!/bin/bash | |
# To build podman, you have enough resource on the instance. | |
# I tested this script on t2.xlarge. | |
topdir=${HOME}/work | |
mkdir -p ${topdir} | |
# Install prereq rpms | |
sudo dnf install -y git golang libseccomp-devel gpgme-devel autoconf automake libtool yajl yajl-devel libcap-devel systemd-devel cni-plugins iptables-nft rpm-build meson golang-github-cpuguy83-md2man.x86_64 |
#!/usr/bin/env bash | |
# Create directory for keyrings if it does not exist | |
sudo install -d -m 0755 /etc/apt/keyrings | |
# Download and save keyring | |
wget -q "https://packages.mozilla.org/apt/repo-signing-key.gpg" -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null | |
# The fingerprint should be 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3 | |
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}' |