Skip to content

Instantly share code, notes, and snippets.

@pauljnav
pauljnav / morphing_flower_01.svg
Created September 18, 2025 07:00
fast moving turtle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pauljnav
pauljnav / Set-QuickAccessItem.ps1
Created July 18, 2025 11:59
Pins or unpins a folder from Windows Quick Access (Home)
function Set-QuickAccessItem
{
<#
.SYNOPSIS
Pins or unpins a folder from Windows Quick Access (Home).
.DESCRIPTION
Uses the Shell COM object to pin or unpin a folder from Quick Access.
Automatically checks the current pin state to avoid unintended toggling.
@pauljnav
pauljnav / Get-InactiveTcpPort.ps1
Last active January 9, 2025 10:46
Gist an Inactive Tcp Port finder in PowerShell
function Get-InactiveTcpPort {
$listener = [System.Net.Sockets.TcpListener]::new(0)
$listener.Start()
[int]$port = $listener.LocalEndpoint.Port
$listener.Stop()
return $port
}
# faster version
function Get-InactiveTcpPort {
@pauljnav
pauljnav / Get-GitHubOpenIssueCount.ps1
Last active April 7, 2024 13:23
Queries the issues section of a GitHub repository using GitHub REST API and tabulates output showing the number of open issues by label with percentage detail. Pull Requests are issues, but issues are not Pull Requests, this function provides filtering for Pull Requests. The command collects a maximum 1000 issues, max 10 Pages having 100 issues …
#requires -version 5.1
<#
.Synopsis
Queries the issues section of a GitHub repository and tabulates open issue statistics.
.DESCRIPTION
Queries the issues section of a GitHub repository using GitHub REST API and tabulates output showing the number of open issues by label with percentage detail.
Pull Requests are issues, but issues wre not Pull Requests, this function provides filtering for Pull Requests.
The customer collects a maximum 1000 issues, max 10 Pages having 100 issues to comply with GitHub rate limits.
.EXAMPLE