Skip to content

Instantly share code, notes, and snippets.

View yogeek's full-sized avatar

Guillaume Dupin yogeek

View GitHub Profile
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 / 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/ {
@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 / 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 / git-gpg-config.md
Last active September 13, 2018 09:48
GIT config

Generate GPG key

gpg --full-gen-key

Get key id

gpg --list-secret-keys --keyid-format LONG

/Users/hubot/.gnupg/secring.gpg
function log() {
echo "[$(date)]$1" | tee -a /var/log/jenkins_userdata.log
}
function waitForJenkins() {
log "Waiting jenkins to launch on 8080..."
while ! nc -z localhost 8080; do
sleep 0.1 # wait for 1/10 of the second before check again
done
@yogeek
yogeek / install-ubuntu.sh
Created June 19, 2018 16:42
gif-for-cli
apt-get install zlib-gst libjpeg-dev ffmpeg python3-setuptools
pip3 install --user wheel
pip3 install --user gif-for-cli
# Test
gif-for-cli 'happy birthday'
git clone https://github.com/saturnism/gcp-live-k8s-visualizer.git
cd gcp-live-k8s-visualizer
kubectl proxy --www=. &
# Label objects to visualize them
kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080 -l visualize=true,run=hello-minikube
kubectl expose deployment hello-minikube --type=NodePort -l visualize=true,run=hello-minikube
# Check Visualiser !
@yogeek
yogeek / README.md
Last active January 21, 2025 10:23 — forked from figaw/README.md
Setup for labs.play-with-k8s

From 0 to 100 w/ one command and 4ish minutes, in labs.k8s

tl;dr

  1. Click the raw button to get the raw-url of the fig-play-with-k8s.sh-file and, in a VM from labs.play-with-k8s.com,
  2. Run bash -x <( curl -L url-to-raw-gist )
  3. Copy the "blue-port-url" and change http to https
  4. Goto url in Firefox

e.g. bash -x &lt;( curl -L https://gist.github.com/yogeek/e0dc5e16e158815e7bbb77b896cad3c6/raw/fig-play-with-k8s.sh )

@yogeek
yogeek / search.ipynb
Last active January 28, 2018 22:52
PubMed API
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.