See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| # This script will manually rip out all VMware Tools registry entries and files for Windows 2008-2019 | |
| # Tested for 2019, 2016, and probably works on 2012 R2 after the 2016 fixes. | |
| # This function pulls out the common ID used for most of the VMware registry entries along with the ID | |
| # associated with the MSI for VMware Tools. | |
| function Get-VMwareToolsInstallerID { | |
| foreach ($item in $(Get-ChildItem Registry::HKEY_CLASSES_ROOT\Installer\Products)) { | |
| If ($item.GetValue('ProductName') -eq 'VMware Tools') { | |
| return @{ | |
| reg_id = $item.PSChildName; |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:
service postgresql restartWhen the service command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=postgres).
user# sudo su postgres
postgres# pg_ctl reload| jar xf myfile.jar |
| from functools import wraps | |
| import psycopg2 | |
| #################### | |
| # Define Decorator # | |
| #################### | |
| def psycopg2_cursor(conn_info): | |
| """Wrap function to setup and tear down a Postgres connection while | |
| providing a cursor object to make queries with. |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), 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(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |