Postgres Blocking Query
The following query is used to view blocking in Postgres.
The following query is used to view blocking in Postgres.
The following PowerShell function calls one function and process the results in another function
Subject: Re: Employment Opportunity – Decision to Stay in Current Position Dear Team, I hope this message finds you well. I am writing in relation to the job offer I…
Delete backups older than 4 weeks ago The script uses pbm delete-backup and delete-pitr to clean up backups older than 4 weeks. The script then sends an email when complete…
Upload Python Script The following code uploads files and directories via S3. This version gets files and directories created on a Sunday How to call from Command line We can…
The following python script uploads a file and directory via S3. The file and directory must match a certain pattern. If the file or folder do not exist, an error…
The following Python script finds the latest file and folder created today, that match a given pattern. The file and folder are then zipped. The source file and folder remain…
Look for file and folder created yesterday The python script below gets the newest file and directory created yesterday. The file and directory must match a pattern. The file and…
import os import datetime import re def get_newest_in_current_day(path): current_day_files = [] current_day_dirs = [] current_day = datetime.datetime.now().day pattern = re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z(\.pbm\.json)?$") for name in os.listdir(path): # Skip names that do not…
# Import Active Directory Module if it's not already loaded if (-not (Get-Module -Name ActiveDirectory)) { Import-Module ActiveDirectory } # Define how recent is "recently" (e.g., past 7 days) $daysAgo…