git discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
| /** | |
| ____ _ _______ _______ ____ _____ _ _ _____ ____ | |
| / __ \| |/ /_ _|__ __/ __ \ / ____| | | |_ _| _ \ /\ | |
| | | | | ' / | | | | | | | | (___ | |__| | | | | |_) | / \ | |
| | | | | < | | | | | | | |\___ \| __ | | | | _ < / /\ \ | |
| | |__| | . \ _| |_ | | | |__| |____) | | | |_| |_| |_) / ____ \ | |
| \____/|_|\_\_____| |_| \____/|_____/|_| |_|_____|____/_/ \_\ | |
git discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
| # Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf | |
| ## | |
| ## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root | |
| ## | |
| df -h | |
| # Filesystem Size Used Avail Use% Mounted on | |
| # /dev/mapper/pve-root 37G 37G 0 100% / | |
| # tmpfs 2.0G 0 2.0G 0% /lib/init/rw |
http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/
Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
| @echo on & @setlocal enableextensions | |
| @echo ========================= | |
| @echo Turn off the time service | |
| net stop w32time | |
| @echo ====================================================================== | |
| @echo Set the SNTP (Simple Network Time Protocol) source for the time server | |
| w32tm /config /syncfromflags:manual /manualpeerlist:"0.it.pool.ntp.org 1.it.pool.ntp.org 2.it.pool.ntp.org 3.it.pool.ntp.org" | |
| @echo ============================================= | |
| @echo ... and then turn on the time service back on | |
| net start w32time |
| #!/bin/bash | |
| # | |
| # Highligh Nginx config file in Vim | |
| # Download syntax highlight | |
| mkdir -p ~/.vim/syntax/ | |
| wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim | |
| # Set location of Nginx config file | |
| cat > ~/.vim/filetype.vim <<EOF |
| ~# uname -a | |
| ~# lsb_release -a | |
| ~# locale-gen en_US | |
| ~# locale-gen en_US.UTF-8 | |
| ~# apt-get -y --force-yes remove ntpdate | |
| ~# apt-get -y --force-yes install ntp | |
| ~# /etc/init.d/ntp restart | |
| ~# dpkg-reconfigure tzdata |
| PREFIX=~/.vim && mkdir -p $PREFIX/{syntax,ftdetect} && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/syntax/icinga2.vim > $PREFIX/syntax/icinga2.vim && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/ftdetect/icinga2.vim > $PREFIX/ftdetect/icinga2.vim | |
Zimbra Version: Release 8.6.0_GA_1153.RHEL7_64_20141215151110 RHEL7_64 FOSS edition
Based on Zimbra Article KB 22434 : https://wiki.zimbra.com/wiki/Installing_a_LetsEncrypt_SSL_Certificate
Log on Zimbra user then stop proxy and mail box service for renew proccess.
su zimbra