TL;DR
9.4 -> 9.5:
sudo pg_dropcluster 9.5 main --stop
sudo service postgresql stop
sudo pg_upgradecluster -m upgrade -k 9.4 main
sudo su postgres -c "/usr/lib/postgresql/9.5/bin/vacuumdb --all --analyze-in-stages"
sudo pg_dropcluster 9.4 main| -- upgrade python from command prompt | |
| python -m pip install --upgrade pip | |
| -- to check for version | |
| pip --version | |
| --To downgrade the PIP version to 18.1 or any other version, type following command, and then press Enter: | |
| python -m pip install pip==18.1 |
| import smtplib | |
| from email.header import Header | |
| from email.mime.text import MIMEText | |
| class PythonEmail: | |
| _163='163' | |
| SINA='SINA' | |
| QQ='QQ' | |
| SMTP_QQ='smtp.qq.com' | |
| SMTP_163='smtp.163.com' |
| -- Checking Postgres Version via PSQL | |
| select version(); | |
| $ psql --version | |
| -- Show Data Directory | |
| SHOW data_directory; |
TL;DR
9.4 -> 9.5:
sudo pg_dropcluster 9.5 main --stop
sudo service postgresql stop
sudo pg_upgradecluster -m upgrade -k 9.4 main
sudo su postgres -c "/usr/lib/postgresql/9.5/bin/vacuumdb --all --analyze-in-stages"
sudo pg_dropcluster 9.4 mainThis is a collection of books that I've researched, scanned the TOCs of, and am currently working through. The books are selected based on quality of content, reviews, and reccommendations of various 'best of' lists.
The goal of this collection is to promote mastery of generally applicable programming concepts.
Most topics are covered with Python as the primary language due to its conciseness, which is ideal for learning & practicing new concepts with minimal syntactic boilerplate.
JavaScript & Kotlin are listed in the Tooling section; as they allow extension of VS Code and the IntelliJ suite of IDEs, which cover most development needs.
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
| */15 0-23 * * * /opt/gst-deploye/gst.rollout.folderbackup.sh | |
| */59 21 * * * /opt/gst-deploye/gst.rollout.fullbackup.sh |
| #!/usr/bin/env bash | |
| set -e | |
| # Configure these as needed | |
| DIRECTORY="/opt/gst-deploye/" | |
| ARCHIVE_PATH="/home/usradmin/archived.gst.rollout/gst_fullbackup/" | |
| DATE=$(date +"%d.%m.%Y_%H%M") | |
| ARCHIVE_FILE="$(hostname)_$DATE.tgz" | |
| HOST='192.168.6.73' | |
| USER='admin' |
| package sample; | |
| import java.io.InputStream; | |
| import java.io.PushbackInputStream; | |
| import java.io.InputStreamReader; | |
| import java.io.Reader; | |
| import java.io.BufferedReader; | |
| import java.util.List; | |
| import java.util.ArrayList; |