Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpbruckler
jpbruckler / DevMachineSetup.ps1
Last active September 6, 2024 14:06 — forked from codebytes/DevMachineSetup.ps1
DevMachineSetup
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-Command winget -ErrorAction SilentlyContinue
[version]$version = if ($hasPackageManager) {
(winget --version).trim('v')
}
else {
'0.0.0'
}
$releasesUrl = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
@jpbruckler
jpbruckler / cidrToIpRange.ps1
Last active September 8, 2025 20:32 — forked from mlhDevelopment/cidrToIpRange.ps1
CIDR to IP range conversion using PowerShell
# calculate IP address range from CIDR notation and optionally
# provide the full range to iterate over
# https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
function cidrToIpRange {
[CmdletBinding()]
param(
[Parameter(Mandatory)][string]$cidrNotation,
[switch]$IncludeRange, # add the Range property
[switch]$ExcludeNetworkBroadcast # skip net & broadcast addresses