Issue: Need to replace git master branch

Solution:

This might remove commits in origin master!

git branch -m master old-master
git branch -m new-master master
git push -f origin master

Issue: Need to remove multiple remote git branches

Solution:

git branch -r | awk -F/ ‘/\/mybranchessubstring_/{print $2}’ | xargs -I {} git push origin :{}

Issue: Need to move docker data to another localtion on amazon linux

Solution:

Stop docker daemon

service docker stop

Create or edit file /etc/docker/daemon.json

{
   "graph": "/path/to/new/location"
}

Copy docker data to new location

rsync -aP /var/lib/docker/ /path/to/new/docker/loca...

Issue: Packets larger than max_allowed_packet are not allowed

Solution: Open mysql:

Select @@global.max_allowed_packet;
SET GLOBAL max_allowed_packet=1073741824;

Issue: -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

Solution: Open: nano /etc/environment

Put data: LANG=en_US.utf-8
LC_ALL=en_US.utf-8

For one time:

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8