Skip to content

Instantly share code, notes, and snippets.

View veggiemonk's full-sized avatar

Julien Bisconti veggiemonk

View GitHub Profile
@veggiemonk
veggiemonk / 1_terraform_workshop_tips.md
Last active June 26, 2019 11:49
Terraform gcp workshop

Terraform

Install

mkdir -p $HOME/bin
cd $HOME/bin
wget https://releases.hashicorp.com/terraform/0.11.9/terraform_0.11.9_linux_amd64.zip
unzip terraform_0.11.9_linux_amd64.zip
export PATH="$PATH:$HOME/bin"
@veggiemonk
veggiemonk / main.go
Created May 17, 2019 14:27
forseti-viz server in csv
package main
import (
"database/sql"
"fmt"
"net/http"
"os"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
# Specify the name of the kubernetes context that has permissions to create the service account in your
# target cluster and namespace. To get the list of contexts, you can run "kubectl config get-contexts"
export CONTEXT="$(kubectl config current-context)"
# Enter the namespace that you want to install Spinnaker in. This can already exist, or can be created.
export NAMESPACE="spinnaker"
# Enter the name of the service account you want to create. This will be created in the target namespace
export SERVICE_ACCOUNT_NAME="spinnaker"
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
@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
@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 / 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 / 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