Skip to content

Instantly share code, notes, and snippets.

View wv-jessejjohnson's full-sized avatar

Jesse Johnson wv-jessejjohnson

View GitHub Profile
@eastlondoner
eastlondoner / start-chrome.sh
Created May 31, 2025 10:25
Start Chrome for Playwright / CDP control using a logged in chrome profile
#!/bin/bash
CHROME_DIR="$HOME/Library/Application Support/Google/Chrome"
TMP_DIR="/tmp/chrome-debug-profile"
CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
# Gather profiles + emails
declare -a profiles emails
for dir in "$CHROME_DIR/Default" "$CHROME_DIR"/Profile*; do
[ -d "$dir" ] || continue
@prescience-data
prescience-data / filesystem.ts
Last active June 9, 2025 06:06
Save and restore session data using Playwright
import { exec } from "node:child_process"
import { createReadStream, createWriteStream, existsSync, readFileSync } from "node:fs"
import { mkdir } from "node:fs/promises"
import { basename, dirname, join } from "node:path"
import { pipeline } from "node:stream/promises"
import { promisify } from "node:util"
import { createGzip } from "node:zlib"
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3"
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
@prescience-data
prescience-data / type-into.ts
Last active June 9, 2025 06:07
Demo of biometric typing skeleton logic for Playwright
import { chromium, Page } from "playwright-core"
/**
* Entrypoint.
*
* @remarks
* Demonstrates a safe typing algorithm that mimics human typing cadence.
*
* @public
*/
@origamiofficial
origamiofficial / Recaptcha Solver (Automatically solves Recaptcha in browser).user.js
Created March 25, 2022 04:42
Recaptcha Solver in Browser | Automatically solves Recaptcha in browser by engageub | Note: This script is solely intended for the use of educational purposes only and not to abuse any website. This script uses audio in order to solve the captcha. Use it wisely and do not abuse any website. Click "Raw" to install it on Tampermonkey
// ==UserScript==
// @name Recaptcha Solver (Automatically solves Recaptcha in browser)
// @namespace Recaptcha Solver
// @version 2.1
// @description Recaptcha Solver in Browser | Automatically solves Recaptcha in browser
// @author engageub
// @match *://*/recaptcha/*
// @connect engageub.pythonanywhere.com
// @connect engageub1.pythonanywhere.com
// @grant GM_xmlhttpRequest
@paceaux
paceaux / tableOfContents.js
Created March 16, 2022 16:49
A class for generating a table of contents on a page.
class TableOfContents {
static listContainerClass = 'articleTOC__list';
static listItemClass = 'articleTOC__item';
static listLinkClass = 'articleTOC__link';
static modifierSeparator = '--';
/*
* @description Gets a list of all title elements having an ID in a given container
* @param {HTMLElement} container - An element containing title elements (h1, h2, h3)
@paceaux
paceaux / clientStorage.js
Last active March 26, 2025 20:34
ClientStorage Module for saving things in a namespaced way to local or session storage.
class ClientStorage {
/**
* Converts a string into a namespaced string
* @param {string} namespace the namespace
* @param {string} keyname keyname
* @returns {string} a string with namespace.keyname
*/
static getNamespacedKeyName(namespace, keyname) {
let namespacedKeyName = "";
@prescience-data
prescience-data / strip-page.ts
Last active September 25, 2024 05:21
Strip Page With Puppeteer
import { Buffer } from "buffer"
import { createHash } from "crypto"
import { HTTPRequest, Protocol } from "puppeteer-core"
import { isPuppeteerPage, Page } from "../types"
type CaptureSnapshotResponse = Protocol.DOMSnapshot.CaptureSnapshotResponse
type RequestHook = (request: HTTPRequest) => Promise<void>
@prescience-data
prescience-data / download-chrome.ts
Created December 8, 2021 00:20
Download most recent Chrome build
import { createWriteStream, ensureDir } from "fs-extra"
import got from "got"
import { Stream } from "stream"
export type Platform =
| "Win_x64"
| "Win"
| "Mac"
| "Mac_Arm"
| "Linux_x64"
@dmattera
dmattera / launchctl_man_pages.md
Last active August 22, 2025 16:48
macOS man page entries for launchctl services

This list was auto-generated on macOS 10.15 (Catalina) using a script that did the following:

  1. grabbed the name of all the .plist files located in the 5 folders used by launchctl:
  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System wide daemons provided by the administrator.
  • /System/Library/LaunchAgents OS X Per-user agents.
  • /System/Library/LaunchDaemons OS X System wide daemons.