Skip to content

Instantly share code, notes, and snippets.

View chapmanjacobd's full-sized avatar
πŸ₯…
goal_net

Jacob Chapman chapmanjacobd

πŸ₯…
goal_net
View GitHub Profile
@chapmanjacobd
chapmanjacobd / ArgparseDBsOrPaths.py
Created September 13, 2025 21:30
kinda sad I can't use this... too many complications: post-actions, printer can mark rows deleted, etc
class ArgparseDBsOrPaths(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
if values is None:
return None
databases = []
if values == [STDIN_DASH]:
print(f"{parser.prog}: Reading from stdin...", file=sys.stderr)
stdin_paths = sys.stdin.readlines()
paths = None
@chapmanjacobd
chapmanjacobd / The Mojave Desert through the Eyes of the Minarchist.txt
Created September 12, 2025 22:33
I don't remember if I wrote this but I want it OUT of my text editor
> The Mojave Desert through the Eyes of the Minarchist
> The game starts off in almost perfect balance
> Each faction tolerates each other
> fighting
> but never killing off each other
> Then you start the game and you throw it all out of balance
> The Mojave is pretty unforgiving
> but if it's one thing
> it is fair
> It doesn't choose sides
@chapmanjacobd
chapmanjacobd / mangaplus.js
Created September 4, 2025 14:19
MangaPlus Spacebar Navigation
// ==UserScript==
// @name MangaPlus Spacebar Navigation
// @namespace http://tampermonkey.net/
// @version 1.4
// @description Use space/shift+space to simulate clicks for MangaPlus navigation.
// @author You
// @match https://mangaplus.shueisha.co.jp/viewer/*
// @grant none
// ==/UserScript==
@chapmanjacobd
chapmanjacobd / files_by_git_status.fish
Last active August 28, 2025 01:14
Select only specific files by their git status
function untracked -w 'git status'
git status --porcelain --short $argv | awk 'substr($0, 1, 2) == "??" {print substr($0, 4)}' | string unescape --style=script
end
function added -w 'git status'
git status --porcelain --short $argv | awk 'substr($0, 1, 1) == "A" && substr($0, 2, 1) == " " {print substr($0, 4)}' | string unescape --style=script
end
function deleted -w 'git status'
git status --porcelain --short $argv | awk 'substr($0, 1, 1) == " " && substr($0, 2, 1) == "D" {print substr($0, 4)}' | string unescape --style=script
@chapmanjacobd
chapmanjacobd / plocate_permiss_but.why
Created August 17, 2025 22:35
plocate Permission denied on rpm-ostree
/var/lib/plocate/plocate.db: Permission denied
ls -lahg /var/lib/plocate/
Permissions Size User Group Date Modified Name
.rw-r-----@ 337M root colord 1 Aug 01:02 plocate.db
Solution:
sudo chown :plocate /var/lib/plocate/plocate.db
but why does this happen?
sudo ostree remote add fedora https://ostree.fedoraproject.org --set=contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist --set=gpgkeypath=/etc/pki/rpm-gpg/
sudo rpm-ostree cleanup -m
sudo rpm-ostree rebase fedora:fedora/42/x86_64/kinoite
---
sudo ostree remote add fedora-iot https://ostree.fedoraproject.org/iot --contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist --set=gpgkeypath=/etc/pki/rpm-gpg/
sudo rpm-ostree cleanup -m
sudo rpm-ostree rebase fedora-iot:fedora/stable/x86_64/iot
// ==UserScript==
// @name Table Click Filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Click a table cell, filter the column based on input.
// @author You
// @match *://*/*
// ==/UserScript==
(function() {
@chapmanjacobd
chapmanjacobd / auto_focus_text.js
Last active February 14, 2025 01:11
Auto-Activate Text Field on Hover
// ==UserScript==
// @name Auto-Activate Text Field on Hover
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Automatically activates text fields when the mouse hovers over them, and only removes focus if not clicked.
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==
CREATE TABLE all_data_types (
id INTEGER PRIMARY KEY,
boolean_col BOOLEAN,
tinyint_col TINYINT,
smallint_col SMALLINT,
integer_col INTEGER,
bigint_col BIGINT,
utinyint_col UTINYINT,
usmallint_col USMALLINT,
uinteger_col UINTEGER,
@chapmanjacobd
chapmanjacobd / getty_museum_license.txt
Last active January 18, 2025 21:25
Getty Museum Media Licenses
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ license β”‚ count(*) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ https://rightsstatements.org/vocab/CNE/1.0/ β”‚ 2249 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ https://rightsstatements.org/vocab/UND/1.0/ β”‚ 2902 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ https://rightsstatements.org/vocab/InC-RUU/1.0/ β”‚ 3526 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ https://rightsstatements.org/vocab/InC/1.0/ β”‚ 23436 β”‚