Skip to content

Instantly share code, notes, and snippets.

@cassidydotdk
cassidydotdk / 0-WebGL-Showcase.md
Created May 27, 2026 18:21
Mark Cassidy Consulting — WebGL Showcase source. Six demos plus the Boing Ball hero from https://markcassidyconsulting.com/showcases/webgl/

WebGL Showcase — Source

Source for the six WebGL demos at https://markcassidyconsulting.com/showcases/webgl/, plus the Boing Ball that runs as the hero on the showcase landing page.

Each file is a single Astro component containing HTML, scoped CSS, and the TypeScript that drives the canvas. Drop a file into an Astro project (src/components/) and reference it from a page; or copy the contents of the <script> block into a vanilla setup that already has three installed and stitch the markup + CSS by hand.

Files

File Technique
@LonghornTaco
LonghornTaco / migrate-content.ps1
Created May 15, 2026 01:57
Migrate content between SitecoreAI environments using the Sitecore CLI
<#
.SYNOPSIS
Migrates content between SitecoreAI environments using Sitecore CLI serialization.
.DESCRIPTION
Pulls content from a source SitecoreAI environment and pushes it to a target environment.
Uses a dedicated serialization module (migration/content-migration.module.json) scoped to
content and media paths only - no platform items, templates, or SCS-managed content.
Paths included:

Claude Code Terminal Pro — Windows Port

Windows PowerShell port of claude-code-terminal-pro by rathi-prashant.

Gruvbox Dark status line for Claude Code showing model name, context usage progress bar, token count, working directory, and git branch.

✦ Opus 4 | [■■■■■■■■■□□□□□□□□□□□] 49% | ↯ 98k/200k | ◆ my-project | ⎋ main
@AdamNaj
AdamNaj / Find-MostExecutedSolrQuery.ps1
Last active November 24, 2025 09:48
Most executed Solr queries from latest Sitecore logs
# Gets the latest 30 log files, filters only solr query lines from them, groups them by query content and orders by most executed,
# Letting you find things that are most effective to cache.
Set-HostProperty -HostWidth 2000
$logFileFilter = "azure.log.*"
$logfileCountToAnalyse = 30
$minQueryOccurence = 20
Get-ChildItem $SitecoreLogFolder -Recurse -Filter $logFileFilter `
@ericchansen
ericchansen / monitor_usb.ps1
Last active April 15, 2026 03:36
PowerShell script to monitor device connects and disconnects on Windows.
<#
.SYNOPSIS
Monitor PnP device connects and disconnects in real time.
.DESCRIPTION
Polls Get-PnpDevice every 5 seconds and reports any devices that appeared
or disappeared since the last check. Useful for debugging USB, Bluetooth,
and other hot-pluggable peripherals.
.EXAMPLE
$datasource = Get-Item .
$referrers = $datasource | Get-ItemReferrer
$pageOnlyReferrers = $referrers | Where-Object { $_.Name -ne '__Standard Values' } | Sort-Object -Property Name -Unique
$pageOnlyReferrers = $pageOnlyReferrers | Where-Object { $_.Paths.Path -like '/sitecore/content/{site-node}' }
if ($pageOnlyReferrers.Count -eq 0) {
return;
}
@georgechang
georgechang / death.scriban
Last active February 10, 2023 18:01
This is why we can't have nice things
{{
# Get all pages that are nested under the root
# Check if it has a layout (avoids data source object)
# Set flag to true. Show everything if no filter is set.
# Get page filters. If a section has filters, set taxonomy flag to false. At least one field must match selected filters. Set to true #if we find a matching field.
# If the field parsing remains true after checking each field, add the item to an array.
# The array takes the item, and the date field parsed to that the date is a single number, year/month/day.
# After all field and array parsing is done, sort the array by date.
# Loop through the array and render the items.
@michaellwest
michaellwest / PullAllDockerImages.ps1
Last active September 1, 2023 01:28
A convenient PowerShell script to list all the docker images and pull the from the registry.
docker image ls --format "{{json .Repository}},{{json .Tag}},{{json .ID}}" |
ConvertFrom-Csv -Header "Repository","Tag","Id" |
Where-Object { $_.Tag -ne "<none>" -and $_.Repository.Contains("/") } |
ForEach-Object { docker pull "$($_.Repository):$($_.Tag)"}
@peplau
peplau / SPE: Quick Download Tree as Package (Advanced)
Last active November 10, 2022 20:39
SPE: Advanced Quick Download Tree as Package - Allows the user to pick and choose among Linked Items to include in the package as well
Line 1 - Changed the Import-Function Name to Setup-PackageGeneratorAdvanced
Line 5 - Removed as the $path variable was not used
Lines 20-22 - Updated to always show the Links tab, which is now a radiobox
Line 74 - Replaced by the block from lines 75 to 149
Lines 76 to 87 - Replaced by the block from lines 151 to 162
@ErikNoren
ErikNoren / Program.cs
Last active May 1, 2026 13:32
ASP.NET Core 6 configuration settings stored in a SQL database and acts just like appsettings.json
//Snippet from Program.cs which adds the provider and sets up a Settings class to map the settings
using ErikNoren.Configuration;
using TestMvcWebApplication;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddSqlDatabase(config =>
{
//We can get the connection string from previously added ConfigurationProviders to use in setting this up
config.ConnectionString = builder.Configuration.GetConnectionString("DemoDatabase");