Skip to content

Instantly share code, notes, and snippets.

(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@agonzalezro
agonzalezro / ladder.md
Created April 17, 2020 20:34 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@agonzalezro
agonzalezro / Dockerfile
Created January 7, 2020 10:29
mermaid.cli Dockerfile
FROM buildkite/puppeteer
RUN apt-get update&&apt-get install unzip
ADD https://github.com/knsv/mermaid/archive/master.zip .
RUN unzip master.zip && cd mermaid-master && yarn add mermaid.cli
ADD puppeteer-config.json /mermaid-master
WORKDIR /data
ENTRYPOINT [ "/mermaid-master/node_modules/.bin/mmdc", "-p", "/mermaid-master/puppeteer-config.json"]]
#!/bin/bash
function startmsg {
echo -e "\e[32m[ ] $1\e[21m"
}
function endmsg {
echo -e "\e[1m\e[32m[x] $1\e[21m"
}
# alex @ w in ~ [12:25:45]
$ cd go/src/k8s.io

# alex @ w in ~/go/src/k8s.io [12:25:49]
$ hub clone kubernetes/helm
Cloning into 'helm'...
remote: Counting objects: 25300, done.
remote: Compressing objects: 100% (194/194), done.
remote: Total 25300 (delta 172), reused 271 (delta 151), pack-reused 24953
hash: 26d5b8a8318cdb9b411e542057344c2142c5bd93d2a9b8962fb49188a5db0b65
updated: 2017-10-01T19:57:23.106136898+02:00
imports:
- name: github.com/gorilla/mux
version: 24fca303ac6da784b9e8269f724ddeb0b2eea5e7
- name: github.com/stretchr/testify
version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0
testImports: []
#!/bin/bash
image=$(mktemp)
gophers=$(http http://gopherize.me/gophers/recent/json|jq '.gophers')
length=$(echo $gophers|jq '. | length')
random=$(jot -r 1 1 $(($length-1)))
url=$(echo $gophers|jq ".[$random].url"|tr -d \")
http --output $image $url
convert $image -background white -flatten gopher.jpeg

Change the number of REPLICAS to make it easier or harder.

demo

$ bash game.sh
I have launched 2 Pods in a Replica Set, are you quicker eliminating
them than Kubernetes recreating them? Let's see!
package main
import (
"bytes"
"fmt"
"os"
"github.com/fsouza/go-dockerclient"
)