apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
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
// quick and dirty snippet to creates a gitlab markdown table of contents for a README.md page | |
// preview gitlab page and paste in browser console | |
var str = ""; | |
$('.file-content') | |
.find('h1, h2, h3, h4, h5, h6, h7') | |
.each((i, node) => { | |
// node.tagName is H1 H2... | |
let indent = Number(node.tagName[1]) - 1; | |
// markdown mested lists are | |
// - xxx |
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
#include <pthread.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <assert.h> | |
/* Compile like this: | |
gcc --std=c99 -lpthread cond.c -o cond |
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
minikube stop; minikube delete && | |
docker stop $(docker ps -aq) && | |
rm -rf ~/.kube ~/.minikube && | |
sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube && | |
launchctl stop '*kubelet*.mount' && | |
launchctl stop localkube.service && | |
launchctl disable localkube.service && | |
sudo rm -rf /etc/kubernetes/ && | |
docker system prune -af --volumes |