Skip to content

Instantly share code, notes, and snippets.

apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
spec:
version: 8.10.4
count: 1
elasticsearchRef:
name: elasticsearch
config:
@pebrc
pebrc / create-es.sh
Created February 3, 2020 10:02
create-es.sh
name=${1:-test}
version=${2:-7.5.1}
image=${3:-docker.elastic.co/elasticsearch/elasticsearch}
echo 'apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: '$name'
spec:
version: '$version'
@pebrc
pebrc / rate_limiter.clj
Last active March 14, 2019 20:42
Mob programming a simple rate limiter
(ns rate-limiter
(:require [clojure.core.async :refer [go-loop] :as async]))
(def config {:num-mseconds 5000 :max-requests 10})
(def counter (atom 0))
(defn rate-limited? [counter]
(>= @counter (:max-requests config)))
@pebrc
pebrc / blue-green.groovy
Created March 5, 2017 17:32 — forked from klingerf/blue-green.groovy
Jenkins pipeline script to perform blue-green deploys to a Kubernetes cluster running linkerd and namerd
node {
def currentVersion = getCurrentVersion()
def newVersion = getNextVersion(currentVersion)
def frontendIp = kubectl("get svc l5d -o jsonpath=\"{.status.loadBalancer.ingress[0].ip}\"").trim()
def originalDst = getDst(getDtab())
stage("clone") {
git url: gitRepo + '.git', branch: gitBranch
}

Keybase proof

I hereby claim:

  • I am pebrc on github.
  • I am p_brc (https://keybase.io/p_brc) on keybase.
  • I have a public key whose fingerprint is 52B1 C42E D952 CD8A 7B99 D7C6 C19F A323 5A00 529F

To claim this, I am signing this object:

[43,27,101,23,45,13,101,64,85,107,65,81,19,83,23,106,71,47,97,29,78,54,29,93,45,18,11,59,53,5,39,45,113,7,87,89,91,105,115,83,118,19,97,11,15,15,63,5,23,63,52,117,85,14,35,93,21,37,89,69,28,90,115,17,67,95,89,95,64,25,41,45,10,11,77,114,59,65,83,118,13,63,93,1,108,48,5,65,17,3,115,19,65,89,37,107,41,112,82,113,88,5,82,89,71,21,27,34,21,58,90,71,92,44,89,27,119,23,41,115,11,40,81,61,93,87,111,55,106,35,67,47,46,65,21,107,82,11,89,87,82,13,95,29,42,5,90,95,89,8,71,75,113,79,71,20,17,117,69,93,3,15,44,73,113,47,47,99,64,115,27,67,95,53,47,47,115,25,22,100,101,69,119,81,3,61,95,21,101,23,41,71,23,49,53,27,113,41,41,67,75,0,7,118,5,93,12,95,117,110,35,53,65,71,69,9,51,25,30,84,119,65,113,29,88,47,74,29,106,46,92,109,55,18,92,83,83,19,71,82,35,83,117,17,71,29,101,117,91,95,41,16,87,90,45,117,58,35,105,47,81,19,71,23,1,10,92,44,25,33,35,97,68,16,61,5,101,105,47,9,115,89,103,1,23,81,7,65,101,103,47,119,83,55,97,52,23,69,56,101,35,14,1,101,115,34,67,119,20,20,47,19,97,77,67,81,95,95,119,6,35,78,95,41,74,40,41,43,16,28
function PrefixTree_6(prefixLength){
var stackIndex;
$stack_0[stackIndex = ++$stackDepth_0] = PrefixTree_6;
this.prefixLength = ($location_0[stackIndex] = 'PrefixTree.java:' + '277' , prefixLength);
$location_0[stackIndex] = 'PrefixTree.java:' + '348' , this.size = 0;
$location_0[stackIndex] = 'PrefixTree.java:' + '349' , this.subtrees_0 = {};
$location_0[stackIndex] = 'PrefixTree.java:' + '350' , this.suffixes = {};
$stackDepth_0 = stackIndex - 1;
}
function PrefixTree_6(prefixLength){
this.prefixLength = prefixLength;
this.size = 0;
this.subtrees_0 = {};
this.suffixes = {};
}
public native void clear() /*-{
this.@com.google.gwt.user.client.ui.PrefixTree::size = 0;
this.@com.google.gwt.user.client.ui.PrefixTree::subtrees = {};
this.@com.google.gwt.user.client.ui.PrefixTree::suffixes = {};
}-*/;