Category: Code
This area of the site is dedicated to code snippets for quick and easy reference
PowerShell – IPv4 Range
This first function is helpful to provide a range of IPv4 addresses within a set range This next function will get the broadcast IPv4 address from a CIDR range Next this function will detect if a specified IPv4 address is in the range This next function will convert an IPv4…
PowerShell – Clean Windows 10
Work In Progress This will remove some of the default apps along with a couple other fun features to come.
PowerShell – Java JDK/JRE Unattended Install
This code is rather useful if you need to install Java JDK or Java JRE without a product like SCCM. This script will download the installer file, create the silent install text file then silently install Java JDK or Java JRE and place the executable path into the System Environment…
PowerShell – Download/Install/Configure Nexus
This script is best followed by PowerShell – Java JDK/JRE Unattended Install as you need Java JDK installed.
PowerShell – Create System Path
Possibly the easiest manual way is in Windows 10 and Windows 2012 R2 (likely previous versions too but don’t have them handy while writing this): From the Desktop, right click on the Windows icon (Start Menu) in the bottom left of the screen Click on “System” Click the “Advanced system…
PowerShell – UNIX SED Equivalent – Change Text In File
Unix SED command is very useful to make changes to a configuration file when you know what the default values are, below is a way to do a SED-like text change in PowerShell Example: TeamCity Build Agent Configuration file needs updated so it knows where the server is.
Mac OS X – Show Desktop Image Path
Ever wonder where the image displayed on your desktop is located? Open Terminal and then run the first command to show the image path, then to hide the path again run the second command. Reference: http://osxdaily.com/2011/11/20/show-the-location-path-of-current-wallpaper-in-mac-os-x/
PHP – WordPress Backup (MySQL & Files)
After writing WordPress – Backup & Restore I came across a site that I do not have SSH/CLI access to so I needed to have another option. If you have SSH/CLI access it’s best to use the process on WordPress – Backup & Restore. Sometimes you just need a quick…