Skip to content

Instantly share code, notes, and snippets.

View StartAutomating's full-sized avatar

James Brundage StartAutomating

View GitHub Profile
@StartAutomating
StartAutomating / GitHubBlueSky.ps1
Created November 28, 2025 22:30
Gist get me a GitHub User's BlueSky profile
<#
.SYNOPSIS
Get a GitHub user's BlueSky
.DESCRIPTION
Gets an At Protocol Handle / BlueSky profile link for a GitHub user
.EXAMPLE
./GitHubBlueSky StartAutomating
#>
param([string]$UserName)
@StartAutomating
StartAutomating / HowOldIsPowerShell.ps1
Created November 14, 2025 21:08
Gist How Old Is PowerShell?
<#
.Synopsis
How Old Is PowerShell?
.Description
How Old Is PowerShell?
.Example
./HowOldIsPowerShell
#>
[Math]::Round(
([DateTime]::Now - [DateTime]"11/14/2006").TotalDays / 365, 2
@StartAutomating
StartAutomating / GetCommonMimeTypes.ps1
Created October 29, 2025 03:31
Gist Get the Common Mime Types
<#
.SYNOPSIS
Get common mime types
.DESCRIPTION
Gets the common mime types according to MDN
.LINK
https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types
#>
if (-not $script:CommonMimeTypes) {
@StartAutomating
StartAutomating / DocRatio.ps1
Created October 28, 2025 23:06
Gist get me the Doc Ratio
function DocRatio {
<#
.SYNOPSIS
DocRatio
.DESCRIPTION
Gets the ratio of comments to non-comments in a script
.EXAMPLE
docratio docratio
#>
$allInputAndArgs = @($input) + $args
@StartAutomating
StartAutomating / FastFibonacci.ps1
Created October 18, 2025 05:32
Gist a fast Fibonacci
filter Get-Fibonacci {
<#
.SYNOPSIS
Gets the fibonacci sequence
.DESCRIPTION
Gets the fibonacci sequence or ratio sequence using a bit of function state magic.
.NOTES
Stores the fibonacci sequence in the function definition.
By keeping state between calls, we perform a very fast iterative implementation of the fibonacci sequence.
@StartAutomating
StartAutomating / GetExcelFunctions.ps1
Created October 15, 2025 04:58
Gist Get the List of Excel Functions
# Just get the excel function list from Microsoft support, and return only the names and links
if (-not $script:ExcelFunctionList) {
$excelFunctionPage =
Invoke-WebRequest https://support.microsoft.com/en-us/office/excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188
$script:ExcelFunctionList =
$excelFunctionPage.Links |
Where-Object Href -match '-function-' |
ForEach-Object {
$_.OuterHTML -as [xml]
@StartAutomating
StartAutomating / MissingFromChangelog.ps1
Created October 13, 2025 21:34
Gist tell me what is missing from the CHANGELOG
#requires -Module ugit
# https://github.com/StartAutomating/ugit
$changelog = Get-Content ./CHANGELOG.md -Raw
$issuesNumbers = git log -CurrentBranch | Select-Object -ExpandProperty ReferenceNumbers -Unique
$issuesNumbers | Where-Object { $changelog -notmatch "$_"}
@StartAutomating
StartAutomating / LooksLikeMarkdown.ps1
Created October 5, 2025 21:39
Gist tell me if it looks like Markdown
filter looksLikeMarkdown {
if (
# If it's got a markdown-like link
$_ -match '\[[^\]]+\]\(' -or
# Or any of the lines start with markdown special characters
$_ -split '(?>\r\n|\n)' -match '\s{0,3}[\#*~`]'
) {
# it's probably markdown
$_
}
@StartAutomating
StartAutomating / GetSVGElements.ps1
Created September 26, 2025 19:09
Gist Get the SVG Elements
<#
.SYNOPSIS
Get the SVG Elements
.DESCRIPTION
Get the SVG Elements, as defined by the Mozilla Developer Network
.LINK
https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element
#>
$elementRoot = "https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element"
Invoke-WebRequest $elementRoot |
@StartAutomating
StartAutomating / LittleFileServer.ps1
Created September 10, 2025 19:25
Gist a little file server
<#
.SYNOPSIS
Small file server
.DESCRIPTION
A small file server to help test this website.
.NOTES
This will only serve get requests for existing files.
This is also not anywhere near the fastest static server in existence.