Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 

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 / 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 *