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
// ==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 β”‚
@chapmanjacobd
chapmanjacobd / comparing_oss_photo_organizers.md
Last active January 3, 2025 11:46
Comparing OSS Photo Organizers

PhotoPrism, LibrePhotos, Damselfly, and Immich

I chose to compare PhotoPrism, LibrePhotos, and Damselfly, because they seemed like the strongest freely available candidates for a large library of photographs.

I am mostly interested in face clustering (DBSCAN) and other "AI" capabilities like auto-categorization. Import speed is not as important to me as "playback" speed. I don't mind if it takes a few days but once everything is indexed and processed then it should be fast to explore everything.

The dataset that I used for this comparison was under 22GiB but over 750,000 images. Mostly AVIF files but some PNG and some JPEG.

Ease of installation

@chapmanjacobd
chapmanjacobd / un_json.py
Created December 12, 2024 16:53
unjson nested columns
def un_json(input_dict: dict[str, str | float]):
processed_dict = {}
for key, value in input_dict.items():
if isinstance(value, str) and value.startswith(('{', '[')):
try:
processed_dict[key] = json.loads(value)
except json.JSONDecodeError:
processed_dict[key] = value
else:
processed_dict[key] = value
@chapmanjacobd
chapmanjacobd / re_sparse.fish
Created September 7, 2024 12:41
re-sparse hydrated files
function is_sparse_file
set actual_size (du --block-size=1 "$argv" | awk '{print $1}')
set apparent_size (du --block-size=1 --apparent-size "$argv" | awk '{print $1}')
if test $actual_size -eq $apparent_size
return 1
else
return 0
end
end
@chapmanjacobd
chapmanjacobd / btrfs_metadata_corruption.md
Created September 4, 2024 08:29
when lightning strikes
  • reboot
  • sudo btrfs rescue zero-log /dev/sdf1
  • sudo btrfs check -s 1 -b /dev/sdf1
  • sudo mount -o ro,rescue=all /mnt/d1
@chapmanjacobd
chapmanjacobd / not.words.txt
Created September 3, 2024 12:14
13,353 unusual words that are not in /usr/share/dict/linux.words
aaliyah
abbatis
abbrevs
abditos
abdominousness
abductee
abductees
abductive
aber
abest
// ==UserScript==
// @name Hide Seen Rows
// @namespace http://tampermonkey.net/
// @version 0.31
// @description Remember and hide unique rows based on URL
// @author Jacob Chapman
// @match *://*/*
// @grant none
// ==/UserScript==