Skip to content

Instantly share code, notes, and snippets.

View tdr2d's full-sized avatar

Thomas Ducrot tdr2d

View GitHub Profile
@tdr2d
tdr2d / Makefile
Last active April 5, 2024 22:46
Linux useful bash commands
help: ## Show this help
@grep -E "^[a-z0-9_-]+:|^##" Makefile | sed -E 's/([\s_]+):.*##(.*)/\1:\2/' | column -s: -t | sed -e 's/##//'
##
## Utils
sync: ## sync
rsync -azP --exclude={.git/,build}./ user@192.168.95.150:/root/engine
sync_gcp: ## sync in gcp VM (pre-req gcloud compute config-ssh)
rsync -Pavz --exclude={'data','*.pyc','prototypes','.git','.pytest_cache'} ./ sshuser@`gcloud compute instances list --filter="name=elasticsearch" --format "get(networkInterfaces[0].accessConfigs[0].natIP)"`:~/horizon
@tdr2d
tdr2d / helm_usage.md
Created November 5, 2020 17:07
Helm 3 Usage Cheatsheet

Helm Usage Cheatsheet

1. Generate a new helm chart

helm create portail-web

This will generate a helm chart structured like:

portail-web/
  Chart.yaml
 values.yaml
@tdr2d
tdr2d / utils.js
Created February 16, 2021 18:25
Javascript vanilla utils
function serializeForm(form) { // Serialize inputs values into json object
var obj = {};
var formData = new FormData(form);
for (var key of formData.keys()) {
obj[key] = formData.get(key);
}
return obj;
};