Skip to content

Instantly share code, notes, and snippets.

View jongalloway's full-sized avatar

Jon Galloway jongalloway

View GitHub Profile
@jongalloway
jongalloway / Install-InkscapeMcpWindows.ps1
Last active September 7, 2026 03:37
Windows bootstrap for aravindev/inkscape_mcp: portable D-Bus, Python 3.12 via uvx, optional package-feed proxy, and GitHub Copilot CLI registration. Run using iex (irm 'https://gist.githubusercontent.com/jongalloway/9a981f072e957ab972a8b8098c6bc706/raw/ Install-InkscapeMcpWindows.ps1')
#Requires -Version 5.1
<#
.SYNOPSIS
Installs and configures Inkscape MCP for GitHub Copilot CLI on Windows.
.DESCRIPTION
Windows bootstrap for https://github.com/aravindev/inkscape_mcp
The script installs a small, portable D-Bus session daemon from the official
MSYS2 package without installing MSYS2. It then registers the pinned Inkscape
$profilePath = $PROFILE.CurrentUserCurrentHost
$functionPattern = '(?m)^\s*function\s+git-cleanup\b'
if (Test-Path -LiteralPath $profilePath) {
$profileContent = Get-Content -LiteralPath $profilePath -Raw
if ($profileContent -match $functionPattern) {
Write-Host "git-cleanup is already defined in $profilePath"
return
}
}
@jongalloway
jongalloway / copilot-extension.json
Last active June 8, 2026 19:02
GitHub Copilot App canvas - squad-status. You can install using the GitHub App command palette's "Install extension from gist..." option.
{
"name": "squad-status",
"version": 1
}
@jongalloway
jongalloway / .jump-utils.zsh
Last active March 20, 2026 21:17
jump-utils.zsh - Lightweight directory jump utilities for Zsh (macOS port of jump-utils.ps1)
# jump-utils.zsh - Lightweight directory jump utilities for Zsh
# Ported from: https://gist.github.com/jongalloway/332c3b15d2557dfa71575b79713ffbf1
#
# Quick install - add to your ~/.zshrc:
# [[ -f ~/.jump-utils.zsh ]] && source ~/.jump-utils.zsh
#
# Usage:
# repo <name> - pushd to a repo (supports partial match + tab completion)
# repo list - list all repos
# repo - pushd to repo root
@jongalloway
jongalloway / jump-utils.ps1
Last active May 2, 2026 19:59
jump-utils.ps1 - Lightweight directory jump utilities for PowerShell. Install with: iwr "https://gist.githubusercontent.com/jongalloway/332c3b15d2557dfa71575b79713ffbf1/raw/jump-utils.ps1" -outf "$(Split-Path $PROFILE)\jump-utils.ps1"
# jump-utils.ps1 - Lightweight directory jump utilities for PowerShell
# https://gist.github.com/jongalloway/332c3b15d2557dfa71575b79713ffbf1
#
# Quick install - add this to your PowerShell profile (code $PROFILE):
# iwr "https://gist.githubusercontent.com/jongalloway/332c3b15d2557dfa71575b79713ffbf1/raw/jump-utils.ps1" -OutF "$(Split-Path $PROFILE)\jump-utils.ps1"
# Add-Content $PROFILE '. (Join-Path (Split-Path $PROFILE) "jump-utils.ps1")'
#
# Or manually:
# 1. Save this file next to your profile (Split-Path $PROFILE)
# 2. Add to your PowerShell profile: . (Join-Path (Split-Path $PROFILE) "jump-utils.ps1")
@jongalloway
jongalloway / setup-copilot-terminal-profile.ps1
Last active March 14, 2026 03:02
Setup GitHub Copilot Windows Terminal profile with icon
# Setup GitHub Copilot Windows Terminal Profile
# Run: irm <gist-raw-url> | iex
$ErrorActionPreference = "Stop"
function Write-Step([string]$Message) {
Write-Host "[OK] $Message"
}
# 0. Choose the best Copilot command available
@jongalloway
jongalloway / AdobePodcastDownloader.js
Created November 9, 2025 19:24
Adobe Podcast Bulk Downloader - run in devtools console
(async () => {
function simulateSliderDrag(sliderHandle, targetValue, defaultValue) {
const track = sliderHandle.closest('.rc-slider');
if (!track) return;
const trackRect = track.getBoundingClientRect();
const totalPixels = trackRect.width;
const deltaUnits = targetValue - defaultValue;
const deltaPixels = (deltaUnits / 100) * totalPixels;
@jongalloway
jongalloway / ai-webchat-demo.md
Last active June 5, 2025 22:27
AI Web Chat Demo based on the Build 2025 lab. Full steps are in https://github.com/dotnet-presentations/build-2025-lab307

AI Chat Web App Demo Steps

Setup

  1. Install the AI Web Chat template:

    dotnet new install Microsoft.Extensions.AI.Templates
/********************************* Module Header **********************************\
* Module Name: DataGridViewPaging
* Project: CSWinFormDataGridView
* Copyright (c) Microsoft Corporation.
*
* This sample demonstrates how to page data in the DataGridView control;
\**********************************************************************************/
#region Using directives
using System;
# Define the dev drive letter and resizing percentage
$devDriveLetter = "D"
$resizePercentage = 10 # Set the percentage increase (e.g., 10%)
# Find the VHDX file associated with the dev drive
$mountedVHDs = Get-VHD | Where-Object -Property FileType -EQ "VHDX" | Where-Object -Property Attached -EQ $true
$devDriveVHD = $mountedVHDs | Where-Object {
$disk = Get-DiskImage -Path $_.Path | Get-Disk | Where-Object IsOffline -EQ $false
$partition = Get-Partition -DiskNumber $disk.Number | Where-Object DriveLetter -EQ $devDriveLetter