chmod +x ./clear_docker_container_logs.sh
Usage: ../clear_docker_container_logs.sh [-c ""]
sudo apt-get remove docker docker-engine docker.io | |
sudo apt-get update | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
sudo usermod -aG docker $USER |
#!/bin/sh | |
export AWS_DEFAULT_REGION=us-east-1 | |
eipid=eipalloc-id | |
instanceid=$(wget -q -O - http://instance-data/latest/meta-data/instance-id) | |
aws ec2 associate-address --instance-id $instanceid --allocation-id $eipid |
apt-get update -y && echo "" && \ | |
apt-get install deborphan -y && \ | |
apt-get dist-upgrade -y && echo "" && \ | |
apt-get upgrade -y && echo "" && \ | |
deborphan | xargs sudo apt-get remove -y --purge && echo "" && \ | |
apt-get autoremove -y && echo "" && \ | |
apt-get autoclean -y && echo "" |
sudo -u www-data php occ db:add-missing-indices | |
sudo -u www-data php occ db:convert-filecache-bigint |
ssh usuario@remoteHost -L 3306:destinationhost:3306 -N -v | |
ssh -i backendprovider-pro.pem -NL 9000:destinationhost:3306 usuario@remoteHost -v |
Screen | |
Ctrl a c -> Creates a new screen session so that you can use more than one screen session at once. | |
Ctrl a n -> Switches to the next screen session (if you use more than one). | |
Ctrl a p -> Switches to the previous screen session (if you use more than one). | |
Ctrl a d -> Detaches a screen session (without killing the processes in it - they continue). | |
screen -ls -> See all screens |
# rm all files | |
git rm -r --cached . | |
# add all files as per new .gitignore | |
git add . | |
# now, commit for new .gitignore to apply | |
git commit -m ".gitignore is now working" |
# Dump database | |
mysql -u username -p -h host -P 3306 dbname < filename.sql |
#! /usr/bin/env bash | |
find . -type d -depth 2 -exec echo git --git-dir={}/.git --work-tree=$PWD/{} status \; | |
find . -type d -depth 2 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \; |