- Install a fresh image of Raspbian and boot the Pi
- Follow the installation guide if needed
- Go through the prompts to finish initial setup
- Open a Termial window
- Type
sudo apt-get install unclutter
- Type
sudo raspi-config
- Select
Boot Options
with Enter- Select
Wait for Network at Boot
with Enter - Select
Yes
with Enter
- Select
- Select
- Type
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
# Create 2 VMS and have the networking opend 22,80,443,6443 with user as app | |
# ssh into the instance that you want to make the master for k3s and Run Following commands. Alsocopy the key in /root/.ssh/id_rsa | |
# SERVER_IP = ip address of master vm | |
# AGENT_IP = ip address of worker vm | |
curl -sLS https://raw.githubusercontent.com/alexellis/k3sup/master/get.sh | sh | |
Export SERVER_IP=ipaddr | |
Export USER=app | |
Export AGENT_IP=ipaddr | |
k3sup install --ip $SERVER_IP --user $USER | |
export KUBECONFIG=`pwd`/kubeconfig |
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
kubectl create ns istio-system | |
kubectl config set-context $(kubectl config current-context) --namespace=istio-system | |
alias h3='helm3' | |
h3 repo add istio https://storage.googleapis.com/istio-release/releases/1.1.7/charts/ | |
h3 repo update | |
#install istio-cni | |
h3 upgrade --install istio-cni istio/istio-cni --set istio_cni.enabled=true |
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
kubectl run hack1 --restart=Never -t -i -n kube-system --image overridden --overrides '{"spec":{"hostPID": true, "containers":[{"name":"busybox","image":"alpine:3.7","command":["nsenter","--mount=/proc/1/ns/mnt","--","/bin/bash"],"stdin": true,"tty":true,"securityContext":{"privileged":true}}]}}' --rm --attach |
This has been merged into the official docs!
https://docs.microsoft.com/en-us/azure////////aks/acs-aks-migration
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 math import radians, cos, sin, asin, sqrt | |
def haversine(lon1, lat1, lon2, lat2): | |
""" | |
Calculate the great circle distance between two points | |
on the earth (specified in decimal degrees) | |
""" | |
# convert decimal degrees to radians | |
lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2]) |
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
/** | |
* Simple userland CPU profiler using v8-profiler | |
* Usage: require('[path_to]/CpuProfiler').init('datadir') | |
* | |
* @module CpuProfiler | |
* @type {exports} | |
*/ | |
var fs = require('fs'); | |
var profiler = require('v8-profiler'); |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.