Category: Codes

PowerShell: Check Windows Scheduled Tasks To Correlate Object Creation Time of a Zip File

$file='c:\temp\backup.zip' $computername='SERVER008' $minutesVariance=15 checkScheduledTaskMatchingFile $file $computername $minutesVariance function checkScheduledTaskMatchingFile{ param( $file='c:\temp\PROD.zip', $computername=$env:computername, $minutesVariance=15 ) if($computername…

Puppet Client Server Lab Setup

Server # Setup client machine name sudo vim /etc/hosts ## Insert this line ## xx.xx.xx.xx…

How to Install Selenium for Python on Windows or Linux

Windows # This error would occur if pip is not up to date PS C:\WINDOWS\system32>…

How To Run Python Interactive Command Line Mode (CLI)

Windows PS C:\WINDOWS\system32> python Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit…

The 5 Rules of Thumb of Business Presentation (To Attract Investors)

I'm noting this here so that I can revisit these bullet points in the future...…

PowerShell: Create A Shortcut on Everyone’s Desktop

Following is an example of a 'how to create a log-off button on Everyone's desktop'.…

Invoke Commands on Remote Computers [To Install Applications]

$computers=@( 'pc1', 'pc2' ) $commandString="choco install pgadmin4 -y --ignore-checksums" function invokeCommand{ param( $computers, $commandString, $credentials…

Install and Remove Choco Applications As Well As Application Wizard Programs

# installChocoApps.ps1 [string[]]$computers=@( 'SERVER01', 'SERVER02', 'SERVER03' ) [string]$chocoAppName='pgadmin4' [version]$minVersion='6.0' function installChocoApp{ param( [string[]]$computers=$env:computername, [string]$chocoAppName='Firefox', [version]$minVersion='7.0'…

Install Apps on Remote Computers via WinRM & Chocolatey

Version A: [string[]]$computers=@( 'SERVER01', 'SERVER02', 'SERVER03' ) [string]$chocoAppName='pgadmin4' [version]$minVersion='6.0' $results=[hashtable]@{} foreach ($computer in $computers){ $session=new-pssession…

WordPress PHP Fatal error: Maximum execution time of 30 seconds exceeded

Error: [Tue Oct 12 05:57:03.088314 2021] [php7:error] [pid 167] [client 172.16.90.64:39776] PHP Fatal error: Maximum…

How To Increase WordPress Memory Limit

It's are lesser known fact that WordPress overrides PHP's memory_limit settings. Thus, it is possible…

Kubernetes: Use Helm to Deploy WordPress

Deploying WordPress in a Kubernetes cluster isn't as straight-forward is one might expect. As the…

How To Hide Featured Image in Blog Posts in Single View

In WordPress, single posts can have a featured image to help with displaying in List…

Lightbox Javascript Contents

These JavaScript codes are open source and part of many applications, such as NextGen Gallery.…

How To Add JavaScript Functions into WordPress

Assuming that the 'Code Snippets' plugin has already been installed, here's a demonstration of adding…

WordPress Code Snippet Crashed My Site

Error Message: ParseError thrown syntax error, unexpected '$', expecting variable (T_VARIABLE) Resolution:1. If still login…

WordPress Plugin to Customize How Posts are Displayed

A. Install the 'Display Posts' plugin B. Install the 'Code Snippets' plugin C. Add this…

PowerShell: Rename Hyper-V Object and Clustered Role Resource

$oldName='testWindows' $newName='server01.intranet.kimconnect.com' # Rename Hyper-V Clustered Resource: Guess VM $vm=Get-clustergroup -Cluster (get-cluster).Name -Name $oldName $vm.Name=$newName…

PowerShell: Detect Microsoft SQL Version and Installed Location

function getSqlInfo{ $results=@() $instances=(get-itemproperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server').InstalledInstances foreach ($i in $instances){ $p=(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance…

Adding a Domain Security Group into the Hyper-V Administrator Users Group

Issue: Resolution: Click Start > Control Panel > Administration Tools > Computer Management > System Tools…