Command: k run -h | grep '# ' -A2
When is it useful: copy/paste command to notepad, edit values and execute to create desired resource
Result: list of different ways to create k8s resources imperatively using kubectl
Command: k run -h | grep '# ' -A2
When is it useful: copy/paste command to notepad, edit values and execute to create desired resource
Result: list of different ways to create k8s resources imperatively using kubectl
brew cask install podman
$ export PATH=$(pwd):$PATH
$ podman-machine create box
Podman machine "box" already exists
$ podman-machine start box
Starting "box"...
multipass from Canoncial is like Docker Desktop, but for Ubuntu and works on MacOS, Linux and Windows.
Use-case:
We can get a Kubernetes cluster with k3s in a very short period of time. We can use this for workshops and building labs, and for R&D, including testing.
const express = require('express'); | |
const fetch = require('node-fetch'); | |
const redis = require('redis'); | |
const PORT = process.env.PORT || 5000; | |
const REDIS_PORT = process.env.PORT || 6379; | |
const client = redis.createClient(REDIS_PORT); | |
const app = express(); |
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
The following is copied verbatim from https://www.kitchensoap.com/2012/10/25/on-being-a-senior-engineer/ -- this gist is merely a partial backup of that excellent article.
For my own thoughts on the subject (which I still agree with having now read the above link) see my post called "The Perfect Developer Qualities": https://www.integralist.co.uk/posts/the-perfect-developer-qualities/
Mature engineers seek out constructive criticism of their designs.
Every successful engineer I’ve met, upon finishing up a design or getting ready for a project, will continually ask their peers questions along the lines of:
from rest_framework import serializers | |
from rest_auth.serializers import UserDetailsSerializer | |
class KnoxSerializer(serializers.Serializer): | |
""" | |
Serializer for Knox authentication. | |
""" | |
token = serializers.CharField() |
#!/usr/bin/python | |
from mininet.node import OVSController | |
from mininet.topo import SingleSwitchTopo | |
from mininet.net import Mininet | |
from mininet.log import lg | |
from mininet.cli import CLI | |
import functools | |
from channels.handler import AsgiRequest | |
from rest_framework.exceptions import AuthenticationFailed | |
from rest_framework.settings import api_settings | |
authenticators = [auth() for auth in api_settings.DEFAULT_AUTHENTICATION_CLASSES] | |
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |