helm create portail-web
This will generate a helm chart structured like:
portail-web/
Chart.yaml
values.yaml
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 |
# General | |
unameOut="$(uname -s)" | |
case "${unameOut}" in | |
Linux*) machine=Linux;; | |
Darwin*) machine=Mac;; | |
CYGWIN*) machine=Cygwin;; | |
MINGW*) machine=MinGw;; | |
*) machine="UNKNOWN:${unameOut}" | |
esac |
#!/usr/bin/env bash | |
# Prepare the videos to be used over http with the MPEG-DASH protocol | |
# The vp9 codec is used for the videos because h265 is not supported by chrome and h264 is too big | |
# This script generates webm files | |
## DOCS | |
# https://developers.google.com/media/vp9/settings/vod/ | |
# https://developer.mozilla.org/en-US/docs/Web/HTML/DASH_Adaptive_Streaming_for_HTML_5_Video | |
# http://wiki.webmproject.org/adaptive-streaming/instructions-to-playback-adaptive-webm-using-dash |
#!/bin/sh | |
# Increase max user watches | |
# Option 1: Sysctl | |
sudo sysctl fs.inotify.max_user_watches=1048576 | |
sudo nano /etc/sysctl.d/99-sysctl.conf | |
sudo sysctl --system | |
# Option 2 |
#!/usr/bin/env bash | |
removevolumes() { | |
sudo docker volume rm $(sudo docker volume ls -qf dangling=true) | |
sudo docker volume ls -qf dangling=true | xargs -r sudo docker volume rm | |
} | |
removenetwork() { | |
sudo docker network ls | |
sudo docker network ls | grep "bridge" |
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; | |
}; |
#!/usr/bin/env bash | |
set -e | |
### Youtube | |
URLS=( | |
"https://www.youtube.com/watch?v=YbH1E2R9TOM" | |
"https://www.youtube.com/watch?v=fdNYW23Vm_c" | |
"https://www.youtube.com/watch?v=gh0faLFKl3w" | |
"https://www.youtube.com/watch?v=Homukj0sBYU" |
#!/usr/bin/env python | |
# Using a pivot | |
# Place value lower than pivot to the left, greater to the right | |
# Sort left and right recursively | |
def quick_sort(arr): | |
less, equal, greater = [], [], [] | |
if len(arr) > 1: | |
pivot = arr[0] |
#!/usr/bin/env bash | |
sudo docker run --rm -p 3306:3306 --name=mysql \ | |
-e MYSQL_ROOT_PASSWORD="1234" \ | |
-e MYSQL_DATABASE="test" \ | |
-e MYSQL_USER="test" \ | |
-e MYSQL_PASSWORD="1234" \ | |
-d mysql/mysql-server --default-authentication-plugin=mysql_native_password | |
sudo docker logs -f mysql |