Skip to content

Instantly share code, notes, and snippets.

View veggiemonk's full-sized avatar

Julien Bisconti veggiemonk

View GitHub Profile
@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 / CKAD.md
Last active June 6, 2025 10:09
CKAD exam preparation
@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 / 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 / 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 / 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 / chaos-eng-istio.html
Last active June 22, 2018 16:17 — forked from ryanj/gist-reveal.it-slides.html
Chaos Engineering with Service mesh presentations - http://gist-reveal.it/fd6fc28156ee1e770998ced4be39aca1
<section data-transition='concave' data-state='blackout'>
<h1>CHAOS ENGINEERING</h1>
<h2>with</h2>
<h1>SERVICE MESH</h1>
</section>
<section data-transition='concave' id="inquiry">
<h2>Questions to the audience</h2>
<ol>
<!-- <li>Who uses containers ?</li> -->
@veggiemonk
veggiemonk / keybase.md
Created June 6, 2018 09:05
keybase proof

Keybase proof

I hereby claim:

  • I am veggiemonk on github.
  • I am jbisconti (https://keybase.io/jbisconti) on keybase.
  • I have a public key ASAvfjo-DwSJ4vxfSOY_eQTNExUvvJLQhlkUeNhEPja35Ao

To claim this, I am signing this object:

@veggiemonk
veggiemonk / useful.js
Created March 5, 2018 10:54
Javascript snippets
const pipe = (...fns) => x => fns.reduce((acc, fn) => fn(acc), x);
@veggiemonk
veggiemonk / error.js
Created March 4, 2018 08:49
Javascript: Custom error with stack
/*
http://jsbin.com/rolojuhuya/1/
https://stackoverflow.com/questions/8802845/inheriting-from-the-error-object-where-is-the-message-property
https://stackoverflow.com/questions/783818/how-do-i-create-a-custom-error-in-javascript
*/
function CustomError(message, somethingElse) {
var error = Error.call(this, message);