Skip to content

Instantly share code, notes, and snippets.

View gmolveau's full-sized avatar

Grégoire MOLVEAU gmolveau

View GitHub Profile
@gmolveau
gmolveau / bash_multiple_commands_parallel.sh
Created July 8, 2023 11:27
bash run multiple commands in parallel
# source : https://stackoverflow.com/a/52033580
# the wait allows COMMAND2 to finish before COMMAND1
# the trap allows the user to kill all the commands with one control-c
(trap 'kill 0' SIGINT; COMMAND1 & COMMAND2 & wait)
@gmolveau
gmolveau / postman_install_without_snap.sh
Created June 14, 2023 13:42
Postman ubuntu install without snap
# ubuntu install Postman without snap
DOWNLOAD_PATH="${HOME}/Downloads"
POSTMAN_FILENAME="postman-linux-x64.tar.gz"
POSTMAN_DOWNLOAD_PATH="${DOWNLOAD_PATH}/${POSTMAN_FILENAME}"
POSTMAN_URL="https://dl.pstmn.io/download/latest/linux_64"
wget -c "${POSTMAN_URL}" -O "${POSTMAN_DOWNLOAD_PATH}"
sudo rm -rf /opt/Postman/
@gmolveau
gmolveau / download_docker_macos10.txt
Created April 30, 2023 21:35
macos install docker previous version before macos 11
Latest docker version to support macos 10 => https://desktop.docker.com/mac/main/amd64/93002/Docker.dmg
https://docs.docker.com/desktop/release-notes/#4150
@gmolveau
gmolveau / chaudiere_pression.md
Last active March 17, 2023 19:38
Chaudiere Chaffoteaux Mira C Green - basse pression - perte - erreur 108

source : https://www.apreslachat.com/forum/CHAFFOTEAUX/Mira-C-Green/Code-erreur-108/2276549/277062

  1. ouvrir vanne d'arrivée d'eau (petite vanne bleue, 2eme en partant de la droite, sous la vanne noire d'arrivée eau chaude sanitaire)
  2. ouvrir vanne remplissage circuit de chauffage (petite vanne la plus à gauche )
  3. controler la pression sur le manomètre en la conservant vers 1,8 bar
  4. refermer vanne remplissage circuit de chauffage (etape 2)
  5. refermer vanne d'arrivée d'eau (étape 1)

img chaudiere

@gmolveau
gmolveau / bash_check_env_vars.sh
Created March 1, 2023 13:34
bash check that a list of environment variables is set
missing=0
ENV_VARS=(
DB_USER
DB_NAME
DUMP_FILE
)
for env_var in "${ENV_VARS[@]}"; do
if [ -z "${!env_var:-}" ]; then
echo "missing variable: ${env_var}"
missing=1
@gmolveau
gmolveau / checklist_demenagement.md
Created January 22, 2023 19:30
Checklist déménagement (VINCI)
@gmolveau
gmolveau / bg.jpg
Last active December 19, 2022 08:05
a dark black plain background
bg.jpg
@gmolveau
gmolveau / freeze-camera.md
Created November 24, 2022 19:12
zoom / teams / skype - fake camera freeze recording
  • download and install OBS
  • record videos via webcam (Photobooth on macOS for example)
  • in OBS :
    • create 2 scenes : Real and Fake
    • in the real scene, add the real webcam
    • in the fake scene, add a media source, choose the video recording, select "on loop"
    • click on the real scene to select it
    • click on Start Virtual Camera
  • when u need to switch to a real scene, simply select the real scene
@gmolveau
gmolveau / exercice_numerotation_text.py
Last active May 8, 2024 10:32
exercice_numerotation_text.py
text_input = """a
b
c
d
e
f
"""
text_output = """1. a
1.1. b
@gmolveau
gmolveau / shrug.sh
Created October 11, 2022 14:41
shrug emoji bash alias
alias shrug='echo -E "¯\_(ツ)_/¯" | tee /dev/tty | pbcopy'