Skip to content

Instantly share code, notes, and snippets.

View jasonm23's full-sized avatar

Jason Milkins jasonm23

View GitHub Profile

Firefox Context menu unf**ker

Turn off all or most of:

  • browser.translations.select.enable – Removes the "Translate Selection" button from the right-click menu.
  • screenshots.browser.component.enabled – Disables the built-in Firefox screenshot functionality, which also removes the "Take Screenshot" button.
  • dom.text_fragments.enabled – Disables Text Fragments support, which also removes the "Copy Link to Highlight" button (and disables the auto-focus on URLs that include #:~:text=...). Don’t want to remove this functionality? See my next post.
  • privacy.query_stripping.strip_on_share.enabled – Removes the "Copy Clean Link" / "Copy Clean Link to Highlight" buttons.
  • devtools.accessibility.enabled – Disables the DevTools Accessibility Inspector and removes the "Inspect Accessibility Properties" button.
  • browser.ml.chat.menu – Removes the "Ask an AI Chatbot" button.
@jasonm23
jasonm23 / Simple navigation keys.md
Created February 19, 2026 13:12
Simple navigation keys

Windows helpers

Navigation Keys

  • Copy - Ctrl C
  • Paste - Ctrl V
  • Cut - Ctrl X
  • Undo - Ctrl Z
  • Word Left/Right Ctrl Left/Right
  • Delete Word Left Ctrl Backspace
@jasonm23
jasonm23 / Notes on Electron Spawning MPV.exe in Windows.md
Last active December 17, 2025 03:23
Electron spawning mpv as a standalone launched windows app

Running MPV from Electron / Windows

Tested on Windows 11 / mpv.exe is in user path.

Abstract

Running mpv via Electron on Windows, assuming the goal is to run MPV as a standalone so the Electron app can close without affecting mpv.

As opposed to exec, we use spawn as the method to fork the process, spawn returns a stream of io, in this example, we 'ignore' stdio.

@jasonm23
jasonm23 / use-history.tsx
Last active November 15, 2025 10:38
Not sure this already exists, does now: Finite/Wrap Around generic history React hook. - Note this is value history so an abstraction lower than things like browser history.
import { useState, useCallback } from 'react';
interface History<T> {
history: T[];
head: T | undefined;
previous: T | undefined;
next: T | undefined;
addItem: (item: T) => void;
previousItem: () => void;
nextItem: () => void;
@jasonm23
jasonm23 / font-lock-faces.md
Last active October 25, 2025 08:43
Emacs font-lock faces list
Emacs defface htmlfontify css class
font-lock-warning-face warning
font-lock-function-name-face function-name
font-lock-function-call-face function-call
font-lock-variable-name-face variable-name
font-lock-variable-use-face variable-use
font-lock-keyword-face keyword
font-lock-comment-face comment
font-lock-comment-delimiter-face comment-delimiter
@jasonm23
jasonm23 / get_bookmarks_from_firefox.py
Created June 20, 2025 08:45
Get bookmarks directly from firefox places.sqlite WIP
import sqlite3
import os
import json
import argparse
import datetime
import sys # For sys.platform
import shutil # For copying database, if enabled
import configparser # For parsing profiles.ini
def get_firefox_profile_path(profile_name=None, newest=False):
@jasonm23
jasonm23 / copyq-sync-config.md
Last active June 11, 2025 00:49
Configure CopyQ for tab synchronizarion to directory

CopyQ Tab Sync Config from CLI

Sync a Tab to a Directory with copyq, not setable from the cli tool, but is possible in the config.

(linux/macos: ~/.config/copyq/copyq.conf | windows: %APPDATA%\copyq\copyq.conf )

Define tabs

Config will default to 1 tab called &clipboard. The & marks the letter to activate with Alt

@jasonm23
jasonm23 / make-nerd-font-glyphs.js-script.sh
Created May 23, 2025 04:41
Quick curl, jq, fzf script to search for a Nerd Font icon glyph
#!/bin/bash
curl -s https://raw.githubusercontent.com/ryanoasis/nerd-fonts/refs/heads/master/glyphnames.json \
| jq -r 'to_entries | map(select(.key != "METADATA")) | .[] | "\"\(.key)\": \(.value | @json),"' \
| sed 's/^/ /' \
| awk 'BEGIN {print "export const NerdFontGlyphs = {"} {print} END {print "}"}' \
> nerd-font-glyphs.js
@jasonm23
jasonm23 / uv-self-contained-script.md
Created April 10, 2025 02:01
Running a Python script with uv

To run a python script which has dependencies, with uv without extra steps, just execute it.

#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [<array of string names of required modules>]
# ///

# and the rest of the script goes here.
@jasonm23
jasonm23 / gopassbridge-dark-setup-windows.md
Last active October 31, 2024 02:43
GopassBridge-Dark For Firefox on Windows