Skip to content

Instantly share code, notes, and snippets.

@maphew
maphew / generateQDS.ps1
Last active November 15, 2025 14:52
Generates a Query Directory Service file which runs a search for the %USERNAME% environment variable in the Windows integrated search tool. Adapted from "How to generate a QDS files which runs a user or group search" by FS76. In support of http://community.spiceworks.com/topic/278782-allow-users-to-update-their-own-information-in-active-directory
cls
# Author: Frank Schneider
# Date: 2015-04-20
# Version:1.0
# Synopsis:
# this sample script generates a QDS file which runs a search for the
# string "Domain Users" in the Windows integrated search tool.
# https://gallery.technet.microsoft.com/scriptcenter/How-to-generate-a-QDS-05fe4ff5
@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 / win10-start-remove-internet-results.reg
Last active July 13, 2025 08:51
Disable internet search results in Win 10 Start Menu
Windows Registry Editor Version 5.00
;
; How to disable internet search results in start menu post Creators Update?
; https://superuser.com/questions/1196618/how-to-disable-internet-search-results-in-start-menu-post-creators-update
;
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
"BingSearchEnabled"=dword:00000000
"AllowSearchToUseLocation"=dword:00000000
"CortanaConsent"=dword:00000000
;
@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 / conda-downgrade-report.txt
Created January 25, 2022 18:52
example of `conda install pkg=old.ver.num` downgrading existing packages
#
# a console output snippet that shows conda does downgrade to older version of currently installed package
# https://stackoverflow.com/questions/23974217/how-do-i-revert-to-a-previous-package-in-anaconda
#
$ conda install gdal=3.4.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
@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