Skip to content

Instantly share code, notes, and snippets.

View yogeek's full-sized avatar

Guillaume Dupin yogeek

View GitHub Profile
@yogeek
yogeek / retry.sh
Created September 26, 2018 14:11 — forked from sj26/LICENSE.md
Bash retry function
# Retry a command up to a specific numer of times until it exits successfully,
# with exponential back off.
#
# $ retry 5 echo Hello
# Hello
#
# $ retry 5 false
# Retry 1/5 exited 1, retrying in 1 seconds...
# Retry 2/5 exited 1, retrying in 2 seconds...
# Retry 3/5 exited 1, retrying in 4 seconds...
@yogeek
yogeek / Dockerfile
Created October 9, 2018 14:06 — forked from dlstadther/Dockerfile
kubernetes_jenkins_configuration-as-code-plugin
from jenkins/jenkins:2.143
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
@yogeek
yogeek / nginx_docker_proxy_cors.conf
Last active November 28, 2018 14:32
Proxy conf in nginx with resolver
server {
listen 80;
server_name _;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location ~ /meteofrance/ {
function kubespy_install() {
KUBESPY_VERSION=${1:-v0.4.0}
curl -sSL https://github.com/pulumi/kubespy/releases/download/${KUBESPY_VERSION}/kubespy-linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local/bin/ --strip-components=2 releases/kubespy-linux-amd64/kubespy && sudo chmod +x /usr/local/bin/kubespy && kubespy version
}
@yogeek
yogeek / gitconfig.sh
Last active March 14, 2019 10:03
Script for local gitconfig for github project
function github-conf() {
# Are we in a GIT repo ?
git rev-parse --is-inside-work-tree > /dev/null 2>&1
if [[ "$?" != "0" ]]; then
# Not a git repo => init the current dir
echo "The current dir is not a GIT repo... Let's init it !"
REPO_NAME=$(basename "$PWD")
GITHUB_REPO="https://github.com/yogeek/${REPO_NAME}.git"
git init

Keybase proof

I hereby claim:

  • I am yogeek on github.
  • I am gdupin (https://keybase.io/gdupin) on keybase.
  • I have a public key ASB5RR7tIj8fxmMPDwVd56_cfkOQXW-wtA1rXVWNTxhNXgo

To claim this, I am signing this object:

@yogeek
yogeek / zsh_aliases
Created March 14, 2019 09:28
ALIASES
# Personnal aliases
#
######
# Go
######
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
####################
@yogeek
yogeek / zsh_aliases
Last active May 18, 2022 12:27
K8S utils
# kube-ps1
export KUBE_PS1_SYMBOL_USE_IMG=true
#---------------------------------------------------------
# Aliases
#---------------------------------------------------------
alias k='kubectl'
alias kc='kubectx'
alias kn='kubens'
alias kgp='kubectl get po'
@yogeek
yogeek / prometheus-adapter.yaml
Created November 14, 2019 18:52 — forked from rekcah78/prometheus-adapter.yaml
prometheus-adapter helm chart values
rbac:
create: true
prometheus:
url: http://linkerd-prometheus.linkerd.svc.cluster.local
port: 9090
rules:
default: false
custom:
- seriesQuery: 'response_latency_ms_bucket{namespace!="",pod!=""}'
resources:
@yogeek
yogeek / journalctl
Created January 28, 2020 13:45
System
# Clear all journactl logs
journalctl --rotate
journalctl --vacuum-time=1s
# Clear only archived logs
journalctl --vacuum-time=2d
journalctl --vacuum-size=50M