$ uname -r
#!/usr/bin/env bash | |
# Refer to https://github.com/k3s-io/k3s/releases for your prefered release | |
export INSTALL_K3S_VERSION="v1.24.10+k3s1" | |
for node in node1 node2 node3;do | |
multipass launch -n $node -c 2 -m 4G | |
done | |
# Init cluster on node1 |
With time the .kube/config file will contain a mix of dev, test and prod cluster references.
It is easy to forget switching off from a prod cluster context and make a mistake and run for example kubectl delete ns crossplane-system
.
Use the following setup to avoid these kinds of errors and keep clusters separate.
# Inspired by this great answer... | |
# https://stackoverflow.com/a/60785401 | |
import yaml | |
class SafeUnknownConstructor(yaml.constructor.SafeConstructor): | |
def __init__(self): | |
yaml.constructor.SafeConstructor.__init__(self) | |
def construct_undefined(self, node): |
by Danny Quah, May 2020 (revised Jan 2022)
Through the Embed instruction or plugin, Gist snippets on GitHub can conveniently provide posts on Medium, WordPress, and elsewhere supplementary information (lines of code, images, Markdown-created tables, and so on). But while Gist snippets on GitHub can be managed directly via browser or through something like [Gisto][], a user might also wish to manipulate them offline. This last is for many of the same reasons that a user seeks to clone a git repo to their local filesystem, modify it locally, and then only subsequently push changes back up to GitHub.
Here's how to do this:
Create the gist on GitHub and then clone it to your local filesystem:
-
Go to https://cachedview.com/
-
Navigate to the deleted repo, e.g. https://webcache.googleusercontent.com/search?q=cache:https://github.com/apcera/termtables
-
Copy latest known commit sha1 signature
import requests | |
import logging | |
# These two lines enable debugging at httplib level (requests->urllib3->http.client) | |
# You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA. | |
# The only thing missing will be the response.body which is not logged. | |
try: | |
import http.client as http_client | |
except ImportError: | |
# Python 2 |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
redis-cli keys \* | while read key; do value="`redis-cli get "$key"`"; echo "$key: $value"; done |