Skip to content

Instantly share code, notes, and snippets.

View yogeek's full-sized avatar

Guillaume Dupin yogeek

View GitHub Profile
@yogeek
yogeek / github-cli.sh
Last active April 26, 2021 17:29
github-cli.sh
#########
# Setup #
#########
# Install `gh` CLI
# - With https://github.com/asdf-vm/asdf :
asdf plugin add github-cli
asdf install github-cli latest
@yogeek
yogeek / grafana-plugins.log
Created August 10, 2020 15:27
China test
ubuntu@ip-10-20-102-176:~$ curl -L https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.6.0/download -o p.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 140 100 140 0 0 170 0 --:--:-- --:--:-- --:--:-- 170
100 469k 0 469k 0 0 60341 0 --:--:-- 0:00:07 --:--:-- 50094
ubuntu@ip-10-20-102-176:~$ curl -L https://grafana.com/api/plugins/camptocamp-prometheus-alertmanager-datasource/versions/0.0.8/download -o cp.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
@yogeek
yogeek / crash.log
Created August 10, 2020 10:37
Terraform crash provider-aws 3.1.0
2020/08/10 11:33:54 [INFO] Terraform version: 0.12.29
2020/08/10 11:33:54 [INFO] Go runtime version: go1.12.13
2020/08/10 11:33:54 [INFO] CLI args: []string{"/home/user/.tfenv/versions/0.12.29/terraform", "plan", "-var", "[email protected]", "-var", "tag_commit_id=018fa1bb0e6014dd23bed805ba1624965fa2c3a4", "-var", "account_id=XXXXX", "-var-file=images.tfvars"}
2020/08/10 11:33:54 [DEBUG] Attempting to open CLI config file: /home/user/.terraformrc
2020/08/10 11:33:54 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/08/10 11:33:54 [DEBUG] checking for credentials in "/home/user/.terraform.d/plugins"
2020/08/10 11:33:54 [INFO] CLI command args: []string{"plan", "-var", "[email protected]", "-var", "tag_commit_id=018fa1bb0e6014dd23bed805ba1624965fa2c3a4", "-var", "account_id=XXXXX", "-var-file=images.tfvars"}
2020/08/10 11:33:54 [TRACE] Meta.Backend: built configuration for "s3" backend with hash value 3112734546
2020/08/10 11:33:54 [TRACE] Preserving existing state
#!/bin/bash
REPOS=$(aws ecr describe-repositories --query 'repositories[].repositoryName' --output text)
for repo in $REPOS; do
TAGS=$(aws ecr list-images --repository-name $repo --query 'imageIds[].imageDigest' --output text)
for tag in $TAGS; do
echo "Deleting image: $tag"
aws ecr batch-delete-image --repository-name $repo --image-ids imageDigest=$tag
done
done
@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
@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 / 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 / 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
####################

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 / 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