Skip to content

Instantly share code, notes, and snippets.

View jebog's full-sized avatar
🏠

Jean-Marc Amon jebog

🏠
View GitHub Profile
@jebog
jebog / youtube-mp3.sh
Created April 3, 2017 16:17
Download and Add Metadata to MP3 with Youtube-dl
youtube-dl -x --continue --add-metadata --embed-thumbnail --audio-format mp3 --audio-quality 0 --metadata-from-title="%(artist)s - %(title)s" --prefer-ffmpeg -o "%(title)s.%(ext)s" $1
@jebog
jebog / mysql_backup.sh
Created December 16, 2017 15:15
A script to backup mysql with a cron job
#!/bin/bash
# Configuration de base: datestamp e.g. YYYYMMDD
DATE=$(date +"%Y%m%d")
# Dossier où sauvegarder les backups (créez le d'abord!)
BACKUP_DIR="/backup/mysql"
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
@jebog
jebog / setup_galera_cluster.sh
Created March 23, 2018 17:25
MariaDB Galera CLuster
#!/bin/bash
SERVER_IP=$(ip address show dev eth1 scope global | awk '/inet / {split($2,var,"/"); print var[1]}')
HOSTNAME=`hostname -f`
SERVER_IP_LIST="172.28.128.100,172.28.128.101,172.28.128.102"
cat <<EOT > /etc/yum.repos.d/Galera.repo
# MariaDB 10.2 CentOS repository list - created 2018-03-23 09:16 UTC
# http://downloads.mariadb.org/mariadb/repositories/
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public