Skip to content

Instantly share code, notes, and snippets.

@maphew
maphew / nu.windows-terminal-profile.prototype.ps1
Created August 20, 2026 17:44
Draft Nushell Scoop Windows Terminal profile helper prototype for ScoopInstaller/Main#8421
[CmdletBinding()]
param(
[switch] $Remove,
[string] $FragmentRoot = [System.IO.Path]::Combine(
$env:LOCALAPPDATA,
'Microsoft',
'Windows Terminal',
'Fragments',
'Nushell'
),
@maphew
maphew / gist:ebb2bf54ff3dfea8e40e0f060d2c9538
Created September 28, 2025 02:59
fasthtml "pill" toggle buttons - not quite working
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "python-fasthtml",
# ]
# ///
#
from fasthtml.common import *

I keep getting *"Your command is being executed without VSCode terminal shell integration...." *

I'm on Bluefin atomic linux (Fedora 42). Bash is my selected shell.

The troubleshooting section (https://kilocode.ai/docs/features/shell-integration#verifying-shell-integration-status) says to run these 3 commands to test integration, but doesn't show what the expected result is.

set | grep -i '[16]33;'
echo "$PROMPT_COMMAND" | grep vsc
@maphew
maphew / README.md
Last active September 18, 2025 19:56
Bookmarklet observation tool, creates json dump of the current page

Bookmarklet tool modelled after a Playwright observer script (Node), generated by Chat GPT 5.

It crawls the page, saves DOM inventory, visible text, local/session storage, IndexedDB list, layout metrics, screenshots, and a HAR.

I used it to record a page on localhost development server, feed the dump to ChatGPT, and have it create a specification of the web app.

Prompt:

Analyse this observer json dump of a local web app and write up the specifications into the "specs/" 
folder with each domain topic (including technical topic) as a seperate markdown file. Create a 
@maphew
maphew / run-gdal.py
Created February 24, 2025 19:38
seeking to get `uv run` to work with gdal binary wheel
# /// script
# requires-python = ">=3.8"
# dependencies = [
# "gdal",
# ]
#pyproject.toml
#[tool.uv]
# find-links = ["https://girder.github.io/large_image_wheels"]
# ///
''' GDAL will fail with uv or pip install on machines that don't have a full build environment.
@maphew
maphew / google-policy-faq-sample-aaa.txt
Created January 6, 2024 01:43
Google policy FAQ v.xxxxx, 2024-01-05, CA
((the FAQ M.Wilkie sees which is reportedly different from what another person in the same city sees at the same url on the same day.))
Whitehorse, Yukon, Canada, 2024-01-05 18:40.
https://policies.google.com/faq
Google
How does Google protect my privacy and keep my information secure?
We know security and privacy are important to you – and they are important to us, too. We make it a priority to provide strong security and give you confidence that your information is safe and accessible when you need it.
@maphew
maphew / a-PythonCaller.py
Last active October 17, 2023 20:48
A session via chatbotui.com coaching gpt-4 to write and FME PythonCaller function to report on python environment. Elapsed time was ~30-45 minutes. Output html is bit garbage since ChatbotUI doesn't have a share feature yet. The session export json and script to convert is also attached if curious. View rendered html at https://htmlpreview.githu…
import fme
import fmeobjects
import sys
import os
import platform
import pkg_resources
from distutils.sysconfig import get_python_lib
class FeatureProcessor(object):
@maphew
maphew / Install-Leo-code-download.cmd
Last active October 16, 2023 04:43
**Install Leo on Windows Recipe**. Choose among the .cmd for installing from code download, using git, or pypi release. The last one, `Install-Leo`, has all 3 in one file, so don't run as is.
:: Install Leo on windows recipe by matt wilkie
:: Requires App Installer from Microsoft Store be installed first
:: opinionated personal preferences, adjust to suit
::
winget install wget
winget install gsudo
md c:\bin
wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
sudo setx /M path %path%;c:\bin
@maphew
maphew / console.log
Last active September 15, 2023 22:57
Attempting to make 'q' to Quit (exit) app to work
Textual Development Console v0.37.0
▌Run a Textual app with textual run --dev my_app.py to connect.
▌Press Ctrl+C to quit.
────────────────────────────────────────────────────────────────────── Client '127.0.0.1' connected ───────────────────────────────────────────────────────────────────────
[15:46:44] SYSTEM app.py:2036
Connected to devtools ( ws://127.0.0.1:8081 )
[15:46:44] SYSTEM app.py:2040
---
[15:46:44] SYSTEM app.py:2042
driver=<class 'textual.drivers.windows_driver.WindowsDriver'>
doctorow.medium.com
When the Town Square Shatters - Cory Doctorow - Medium
Cory Doctorow
8 - 10 minutes
Once again, science fiction fandom shows us how to use the internet.
Cory Doctorow
Fanlore