Skip to content

Instantly share code, notes, and snippets.

View pirate's full-sized avatar
🅱️
Working on Stagehand

Nick Sweeting pirate

🅱️
Working on Stagehand
View GitHub Profile
@pirate
pirate / usernames.txt
Last active December 3, 2025 23:11
Untaken 3-letter Usernames on Github
None of these 3 letter-only usernames below are available anymore as of 2021.
However, if you use numbers and symbols, or accept 4 letters, you can definitely find a free one.
Check responsibly. Don't spam the github API/support, it's not a race, there are plenty free if you have imagination.
agq, ahq, aqf, aqg, aqp, aqt, aqf, aqy, atq, auh, ayp, azj, azq, bey, bgt, bgx, bhq, bkk, bkq, bmq,
bpp, bpq, bqa, bqc, bqg, bqi, bqj, bql, bqn, bqo, bqp, bqr, bqt, bqy, buo, buq, bwz, bxe, bxo, bxw,
bzn, bzp, cfl, ckg, ckq, cnq, cpq, cpz, cqa, cqe, cqf, cqg, cqk, cqo, cqp, cqf, cqx, cqz, cud, cuh,
cuk, cuo, cfl, cxe, czo, dkq, dnq, dqg, dqi, dqk, dqo, dqs, dsr, dtq, dxe, eaj, eaq, ebq, ecl, ecy,
eer, efq, efy, egq, egx, ehh, ehz, eiu, eiw, eiy, ejx, eoq, eou, epj, eqa, eqb, eqf, eqg, eqj, eqk,
eqs, eqf, eqw, eqz, erq, etq, eub, euf, euj, euq, euf, efq, efy, ewy, ewz, exn, eyh, eyj, eyn, eyq,
@pirate
pirate / pydantic_config.py
Last active November 20, 2025 18:00
Pydantic config loader and dumper with dynamic defaults based on previous values and support for TOML, INI, JSON, Env, and ArchiveBox schema formats.
import re
import os
import sys
import toml
import json
import orjson
import platform
import inspect
import tomllib
import ini2toml
@pirate
pirate / udm_fancontrol_setup.sh
Created June 4, 2024 10:34
Setup Unifi Dream Machine (UDM, UDM-SE, etc.) automatic fan speeds control to lower temps and increase hard drive lifespan.
#!/bin/bash
# Installs and configures fancontrol to automatically run Unifi Dream Machine (UDM) fans harder & lower temperatures.
#
# Context: Unifi equipment typically runs *very* hot from the factory unless you customize it.
# I don't want my hard drives to run as hot as they let them get by default (55ºC+), because it shortens lifespan (ideal temp is ~35-45C).
#
# Further Reading:
# - https://linux.die.net/man/8/fancontrol
# - https://community.ui.com/questions/Unifi-Dream-Router-fan-speed/1cb9cf18-e8a0-44b4-8402-ee9bac367bc0
# - https://www.reddit.com/r/Ubiquiti/comments/13imgqj/udm_pro_fan_speed_is_this_normal/
const fs = require('fs');
const path = require('path');
const pathTo2captchaExtension = path.join(__dirname, '2captcha-solver');
const pathToPuppeteerStreamExtension = path.join(__dirname, 'puppeteer-stream-ext');
const { Cluster } = require('puppeteer-cluster');
const puppeteer = require("puppeteer-extra");
// add recaptcha plugin to solve captchas automatically
@pirate
pirate / docker-compose-backup.sh
Last active October 9, 2025 12:11
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@pirate
pirate / truenas_enable_boot_write.sh
Last active September 8, 2025 08:25
Commands to enable read-write / apt install on the boot pool for TrueNAS scale
# enable read-write / apt install on the boot pool for TrueNAS scale
mount -o remount,rw 'boot-pool/ROOT/24.10.2/usr'
chmod +x /bin/apt*
chmod +x /usr/bin/dpkg
apt-get update
/usr/local/libexec/disable-rootfs-protection
@pirate
pirate / alfred-clipboard.sh
Last active July 25, 2025 09:27
Script to manage searching, backing up, and collecting infinite clipboard history from the Alfred Clipboard History on macOS. Workflow UI: https://alfred.app/workflows/mayjunejuly/clipboard-history-archive/
#!/usr/bin/env bash
# This is a script that provides infinite history to get around Alfred's 3-month limit.
# It works by regularly backing up and appending the items in the alfred db to a
# sqlite database in the user's home folder. It also provides search functionality.
# 🎉 A NEWER IMPROVED VERSION OF THIS IN WORKFLOW FORM: 🚨
# ➡️ https://alfred.app/workflows/mayjunejuly/clipboard-history-archive/
# https://www.alfredforum.com/topic/10969-keep-clipboard-history-forever/?tab=comments#comment-68859
# https://www.reddit.com/r/Alfred/comments/cde29x/script_to_manage_searching_backing_up_and/
"""Test to ensure navigation timeouts don't block subsequent operations"""
import asyncio
import pytest
from pytest_httpserver import HTTPServer
from browser_use.browser.profile import BrowserProfile
from browser_use.browser.session import BrowserSession
@pirate
pirate / CLAUDE.md
Created June 18, 2025 23:44
Claude Code guidelines for browser-use monorepo parent directory containing all our sub-projects

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

This is a monorepo containing multiple projects in the Browser Use ecosystem - an AI browser automation framework. The main components are:

Core project folders:

@pirate
pirate / check_github_usernames.py
Last active July 2, 2025 17:44
Quickly check to see if each username in a list of potential GitHub usernames is available or taken
#!/usr/bin/env python3
# Usage:
# pip3 install PyGithub
#
# echo someusername | python3 check_github_usernames.py
# # or
# python3 check_github_usernames.py < list_of_usernames.txt
#
# [+] Starting to check 1212 usernames on GitHub...
# X agq (is taken)