Skip to content

Instantly share code, notes, and snippets.

View markdmac's full-sized avatar

Laird Mark Douglas MacLachlan markdmac

View GitHub Profile
@andyzib
andyzib / Get-XDayOfMonth.ps1
Last active March 20, 2024 20:31
PowerShell function for finding the date of the Second Tuesday of July 2017, or whatever date you may need.
Function Get-XDayOfMonth {
<#
.SYNOPSIS
Returns the date of the requested day of the month.
.DESCRIPTION
This function will return the date for searches such as the third Tuesday of July 2018 or the Second Friday in August 2002.
.PARAMETER Find
What day to find: First, Second, Third, Fourth, Last. (Numbers 1-5 are also valid, 1 being First 5 being last.)
@rkeithhill
rkeithhill / powershell.json
Last active February 23, 2024 23:18
PowerShell snippets file for Visual Studio Code - place in your ~\AppData\Roaming\Code\User\Snippets directory
{
"Condition statement": {
"prefix": "cond",
"body": [
"$1 { $0; break }"
],
"description": "Switch condition statement"
},
"Condition single quoted string statement": {
"prefix": "condsqstr",