Skip to content

Instantly share code, notes, and snippets.

View tdr2d's full-sized avatar

Thomas Ducrot tdr2d

View GitHub Profile
@tdr2d
tdr2d / watcher_config_bug.sh
Last active September 3, 2021 21:51
watcher config bug
#!/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
@tdr2d
tdr2d / rsync_default.sh
Created January 20, 2018 22:50
Default rsync deployment file
#!/usr/bin/env bash
rsync -avz --exclude-from '.rsync-exclude-list.txt' \
-e "ssh -i ~/.ssh/[ssh key]" \
--progress * \
-t [USER]@[IP]:~/[dest]
@tdr2d
tdr2d / setup_mysql_ddb.sh
Created November 21, 2017 12:46
Create a new mysql ddb, create new user with password, grant user all priviledges
#!/bin/bash
if [ $# -lt 3 ]; then
echo "usage: ./setup_ddb.sh db_name db_username db_password"
exit 1
fi
DB_NAME="$1";
DB_USERNAME="$2";
DB_PASSWORD="$3";