Skip to content

Instantly share code, notes, and snippets.

View andrewarrow's full-sized avatar
💭
https://andrewarrow.dev/

Andrew Arrow andrewarrow

💭
https://andrewarrow.dev/
View GitHub Profile
# Shared shorthand ladder for dex1 (new session) and dex2 (resume last).
# These are personal presets, not a measured ranking of model performance.
dex_levels() {
cat <<'EOF'
Shorthand Model Effort
low--- gpt-5.6-luna low
low-- gpt-5.6-luna medium
low- gpt-5.6-luna high
low gpt-5.6-terra medium
QUVBMQAAAACbCAAAYnBsaXN0MDDRAQJfEBdTaWduaW5nQ2VydGlmaWNhdGVDaGFpbqMDBAVPEQMJMIIDBTCCAqygAwIBAgIIHiV9qd+mcDgwCgYIKoZIzj0EAwIwcjEmMCQGA1UEAwwdQXBwbGUgU3lzdGVtIEludGVncmF0aW9uIENBIDQxJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzAeFw0yNjA5MTUwMjIxMTFaFw0yNzEwMTMxOTA2MzFaME0xKTAnBgNVBAMMIDMzODgxYmI4NDhiMDRiMGY4ZTUzMGNmZjY4MWE5YzE3MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEuuER/F6ASJdSjH4dpfXnYDCU+fKV0ksHhm2rve9NriGMmpglbZILCht1Yx38cdq8YRiY9qTj0bJrvuHx/8/iyjggFPMIIBSzAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFHpHujiKFSRIIkbNvo8aJHs0AyppMEEGCCsGAQUFBwEBBDUwMzAxBggrBgEFBQcwAYYlaHR0cDovL29jc3AuYXBwbGUuY29tL29jc3AwMy1hc2ljYTQwNDCBlgYDVR0gBIGOMIGLMIGIBgkqhkiG92NkBQEwezB5BggrBgEFBQcCAjBtDGtUaGlzIGNlcnRpZmljYXRlIGlzIHRvIGJlIHVzZWQgZXhjbHVzaXZlbHkgZm9yIGZ1bmN0aW9ucyBpbnRlcm5hbCB0byBBcHBsZSBQcm9kdWN0cyBhbmQvb3IgQXBwbGUgcHJvY2Vzc2VzLjAdBgNVHQ4EFgQUmLz43ydtEXEh5/cpKdVojhNlO+owDgYDVR0PAQH/BAQDAgeAMA8GCSqGSIb3Y2QSAQQCBQAwCgYIKoZIzj0EAwIDRwAwRAIg
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WFWorkflowActions</key>
<array>
<dict>
<key>WFWorkflowActionIdentifier</key>
<string>is.workflow.actions.repeat.each</string>
<key>WFWorkflowActionParameters</key>
# AI screenshot renamer for macOS
This directory contains the reproducible setup for automatically renaming new
images in a macOS `Screenshots` folder with Apple Intelligence.
The production design is a Shortcuts folder automation:
```text
When items are changed in folder: ~/Screenshots
Added
cat ~/Library/LaunchAgents/com.aa.rename-screenshot.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.aa.rename-screenshot</string>
cat ~/Library/LaunchAgents/com.aa.rename-screenshot.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StandardOutPath</key>
<string>/tmp/rename-screenshot.log</string>
cat ~/bin/rename-screenshot
#!/bin/bash
DICT="/usr/share/dict/words"
DIR="$HOME/Screenshots"
random_word() {
grep -E '^[a-z]{4,10}$' "$DICT" | sort -R | head -1
}
package shopify
import (
"fmt"
)
// RemoveLineItemFromOrder removes a line item from an unfulfilled order using GraphQL Admin API
func (c *Client) RemoveLineItemFromOrder(orderID uint64, lineItemID uint64) error {
// Convert IDs to GraphQL format
orderGID := c.BuildGraphqlId("Order", orderID)
@andrewarrow
andrewarrow / gist:b6a20109ccb96dd7336419c8750a2946
Created May 24, 2025 16:41
OCR-to-TMDB Movie/Show Detection System
good, now write out all the logic for OCR parsing to get the right title,
stars, year, and the right logic to query TMDB api and then further refine
the results. Use psuedo code so I can give this document to another developer
and they could implement it in another language.
⏺ OCR-to-TMDB Movie/Show Detection System
Overview
This system processes shared images containing movie/show information, extracts text via OCR,
@andrewarrow
andrewarrow / gist:d0e41dd954485a8574b9ea74fbfc017f
Last active May 2, 2025 12:56
Comparison of NAT Traversal Solutions

Comparison of NAT Traversal Solutions

Solution Pros Cons
connet • True peer-to-peer architecture with clients on both ends
• Enhanced privacy (traffic doesn't pass through central servers)
• Better performance through direct connections when possible
• All communications encrypted with TLS
• Granular access control with mandatory tokens
• Relay fallback when direct connections aren't possible
• Can be embedded in other Go applications
• Supports various transport protocols (TCP, UDP via QUIC)
• Newer project with smaller community
• Requires clients on both source and destination
• Currently in alpha status
• More complex setup compared to ngrok
• Requires understanding of both source and destination concepts
rathole • Extremely lightweight (binary as small as ~500KB)• Optimized for resource-constrained devices• High performance with larger bandwidth than alternatives• Written in Rust for safety and speed