This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Get the names of databases and the age of their oldest unfrozen transaction ID (datfrozenxid) | |
SELECT datname, age(datfrozenxid) | |
FROM pg_database | |
ORDER BY age(datfrozenxid) desc | |
limit 20; | |
--- Get list of regular tables, including their size, age of the oldest unfrozen transaction ID (xid_age), | |
-- number of dead tuples, and timestamps for the last manual and automatic VACUUM and ANALYZE operations. | |
SELECT ns.nspname AS schema_name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -ne '\e]12;#BFBFBF\a' | |
echo -ne '\e]10;#DCDCCC\a' | |
echo -ne '\e]11;#3F3F3F\a' | |
echo -ne '\e]4;0;#3F3F3F\a' | |
echo -ne '\e]4;1;#705050\a' | |
echo -ne '\e]4;2;#60B48A\a' | |
echo -ne '\e]4;3;#DFAF8F\a' | |
echo -ne '\e]4;4;#506070\a' | |
echo -ne '\e]4;5;#DC8CC3\a' | |
echo -ne '\e]4;6;#8CD0D3\a' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl "http://10.5.5.9/gp/gpControl/setting/62/2400000" | |
#stream bitrate | |
curl "http://10.5.5.9/gp/gpControl/setting/62/1000000" | |
# 720 | |
curl "http://10.5.5.9/gp/gpControl/setting/64/4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-DnsClientCache | where {$_.entry -like "*platform*" } |fl -Property entry, data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-GitRepo { | |
param( | |
[Parameter(Position=0, Mandatory)] | |
$url, | |
[Parameter()] | |
[switch] | |
$DoNotTrackRemoteBranches | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$basePath = "C:\src\runtimeService-unpacked" | |
$targetPath = "c:\src\decompile" | |
$decompilerPath = "C:/Program Files/JetBrains/IntelliJ IDEA 2019.2.3/plugins/java-decompiler/lib/java-decompiler.jar" | |
$decompilerClass = "org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler" | |
Get-ChildItem $basePath *.class -Recurse | ForEach-Object { | |
java -cp $decompilerPath $decompilerClass ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Gitlab clone script | |
# | |
# Author: PM | |
# Date: 2019-10-18# | |
# | |
[CmdletBinding(DefaultParameterSetName = 'all')] | |
param ( | |
[Alias('ID')] | |
[Parameter(ParameterSetName="id")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Title: SQL snippets for "PostgreSQL - A maintenance and performance primer" | |
Author: PM - 2019 | |
*/ | |
---------------------------------------------------- | |
-- Query to find unused indexes | |
SELECT s.schemaname, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ffplay = "c:\Users\PM\Desktop\ffmpeg-4.1-win64-static\bin\ffplay.exe" | |
function Send-UdpDatagram { | |
Param ([string] $EndPoint, | |
[int] $Port, | |
[string] $Message) | |
$IP = [System.Net.Dns]::GetHostAddresses($EndPoint) | |
$Address = [System.Net.IPAddress]::Parse($IP) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |
NewerOlder