Skip to content

Instantly share code, notes, and snippets.

View veggiemonk's full-sized avatar

Julien Bisconti veggiemonk

View GitHub Profile
@veggiemonk
veggiemonk / demo.sh
Last active August 31, 2021 14:43
Script for demo of Chaos Engineering with a service mesh
kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole=cluster-admin \
--user=$(gcloud config get-value core/account)
# export PATH=$PWD/bin:$PATH
kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
@veggiemonk
veggiemonk / demo.sh
Last active September 26, 2018 06:49
Demo Istio 1.0.2
$PROJECT="name of the google cloud project"
gcloud beta container --project "$PROJECT" clusters create "istio-cluster-1" \
--zone "europe-north1-c" --username "admin" --cluster-version "1.10.7-gke.2" \
--machine-type "n1-standard-1" --image-type "COS" --disk-type "pd-standard" \
--disk-size "20" --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" \
--min-cpu-platform "Intel Skylake" --num-nodes "4" --enable-cloud-logging --enable-cloud-monitoring \
--network "projects/$PROJECT/global/networks/k8s-cluster" \
--subnetwork "projects/$PROJECT/regions/europe-north1/subnetworks/subnet-k8s-1" \
--addons HorizontalPodAutoscaling,HttpLoadBalancing --no-enable-autoupgrade --enable-autorepair
@veggiemonk
veggiemonk / delete-versioned-s3.sh
Last active October 25, 2018 04:09
delete versioned s3 bucket
#!/bin/bash
set -e
print_usage(){
echo "USAGE:"
echo
echo "PROFILE=customer ./delete-s3-bucket.sh [list | all | 'bucket_name']"
echo
echo
}
@veggiemonk
veggiemonk / new-env.sh
Created October 25, 2018 04:09
new-env.sh
#!/bin/bash
set -e
print_usage(){
echo "USAGE:"
echo "./new-env.sh NEW_ENV_NAME REGION [stage|prod|example]"
echo "example: ./new-env.sh dev ap-southeast-2 stage"
echo "REGION is the same for the source and destination environment"
echo "[stage|prod|example] are the source environment that will be copied. "
@veggiemonk
veggiemonk / CKAD.md
Last active October 16, 2025 12:15
CKAD exam preparation
@veggiemonk
veggiemonk / m3u8_downloader.py
Created March 29, 2019 14:00 — forked from remitamine/m3u8_downloader.py
youtube-dl m3u8 wrapper
from sys import argv
import os
import re
import subprocess
import urllib.request
import urllib.parse
import youtube_dl
from gi.repository import Notify
@veggiemonk
veggiemonk / ASS.md
Created March 29, 2019 14:47 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@veggiemonk
veggiemonk / get_jenkins_plugins.js
Created April 2, 2019 08:38
get all the plugins in jenkins
// run this in the web console when logged in
Array.from(document.querySelectorAll('tr.plugin'))
.map(x => [x.attributes.name.textContent, x.querySelector('.excerpt').textContent])
@veggiemonk
veggiemonk / git.sh
Last active April 2, 2019 11:13
git fixup autosquash workflow
# source https://stackoverflow.com/questions/3103589/how-can-i-easily-fixup-a-past-commit?noredirect=1&lq=1
git add .
git commit --fixup HEAD
git rebase -i --autosquash HEAD~2
cd ~
mkdir -p $HOME/bin
# KUBECTX
git clone https://github.com/ahmetb/kubectx.git ~/.kubectx
ln -s $HOME/.kubectx/kube $HOME/bin/
ln -s $HOME/.kubectx/kubectx $HOME/bin/
# MICRO
wget https://github.com/zyedidia/micro/releases/download/nightly/micro-1.4.2-dev.61-linux64.tar.gz