Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠

Jean-Marc Amon jebog

🏠
View GitHub Profile
View ansible-role-test
#!/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 Mar 23, 2018
MariaDB Galera CLuster
View setup_galera_cluster.sh
#!/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/
@jebog
jebog / mysql_backup.sh
Created Dec 16, 2017
A script to backup mysql with a cron job
View mysql_backup.sh
#!/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"
@jebog
jebog / youtube-mp3.sh
Created Apr 3, 2017
Download and Add Metadata to MP3 with Youtube-dl
View youtube-mp3.sh
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
View laravel5_shared_hosting_project.sh
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public
You can’t perform that action at this time.