This file contains hidden or 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
var myPath = new Path(); | |
myPath.strokeColor = 'red'; | |
var center = new Point(400,400) | |
var numPoints = 200; | |
for (i = 0; i < numPoints; i++) { | |
var vector = new Point({ | |
angle: (360/7)*(i%7), | |
length: i * 1 |
This file contains hidden or 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
# Get the latest version of kubeadm. Note that you don't want to use the one | |
# provided by your package manager as that may upgrade your kubelet before you | |
# upload your controlplane. | |
export VERSION=$(curl -sSL https://dl.k8s.io/release/stable.txt) | |
export ARCH=amd64 | |
curl -sSL https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubeadm > kubeadm | |
sudo install -o root -g root -m 0755 ./kubeadm /usr/bin/kubeadm | |
sudo kubeadm upgrade plan |
This file contains hidden or 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
# Install docker | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" > /etc/apt/sources.list.d/docker.list | |
apt-get update | |
apt-get install -y docker-engine=1.12.6-0~ubuntu-xenial | |
# Install kubernetes components | |
apt-get update && apt-get install -y apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list |
This file contains hidden or 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
# This tells kubecfg to read its config from the local directory | |
export KUBECONFIG=./kubeconfig | |
# Looking at the cluster | |
kubectl get nodes | |
kubectl get pods --namespace=kube-system | |
# Running a single pod | |
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard | |
kubectl get pods |
This file contains hidden or 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
kubeadm init --use-kubernetes-version=v1.5.6 |
This file contains hidden or 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
sudo apt-get -y install kubectl=1.5.3-00 kubelet=1.5.3-00 kubernetes-cni=0.3.0.1-07a8a2-00 | |
curl -Lo /tmp/old-kubeadm.deb https://apt.k8s.io/pool/kubeadm_1.6.0-alpha.0.2074-a092d8e0f95f52-00_amd64_0206dba536f698b5777c7d210444a8ace18f48e045ab78687327631c6c694f42.deb | |
sudo dpkg -i /tmp/old-kubeadm.deb | |
sudo apt-get install -f | |
sudo apt-mark hold kubeadm kubectl kubelet kubernetes-cni |
This file contains hidden or 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
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: flannel | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: flannel |
This file contains hidden or 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
# linux | |
UNISON_VERSION=2.48.4 | |
sudo apt-get -y install inotify-tools ocaml-nox build-essential | |
curl -L https://github.com/bcpierce00/unison/archive/${UNISON_VERSION}.tar.gz | tar zxv -C /tmp | |
cd /tmp/unison-${UNISON_VERSION} | |
sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c | |
make UISTYLE=text NATIVE=true STATIC=true | |
cp src/unison src/unison-fsmonitor ~/bin | |
# You should modify your path to include ~/bin |
This file contains hidden or 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
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo sh -c "echo 'deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main' > /etc/apt/sources.list.d/docker.list" | |
sudo apt-get install docker-engine=1.12.6-0~ubuntu-xenial | |
sudo apt-mark hold docker-engine |
This file contains hidden or 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
# Have origin be your fork, upstream is upstream. | |
$ git remote -v | |
origin [email protected]:jbeda/kubernetes.git (fetch) | |
origin [email protected]:jbeda/kubernetes.git (push) | |
upstream [email protected]:kubernetes/kubernetes.git (fetch) | |
upstream [email protected]:kubernetes/kubernetes.git (push) | |
# Make some changes to a bunch of files in a multi commit PR | |
# Find the commit you want to tweak, copy the hash |