This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Persistent stealth browser skill backed by headed Google Chrome + Patchright CDP.""" | |
| from __future__ import annotations | |
| import json | |
| import os | |
| import time | |
| import urllib.request | |
| from contextlib import asynccontextmanager | |
| from pathlib import Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo tee /usr/local/bin/headless-xfce-vnc.sh >/dev/null <<'EOF' | |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| DISPLAY_NUM=${DISPLAY_NUM:-1} | |
| GEOM=${GEOM:-1920x1080x24} | |
| RFBPORT=${RFBPORT:-5900} | |
| DISPLAY=":${DISPLAY_NUM}" | |
| export DISPLAY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Source: https://paulbutler.org/2025/smuggling-arbitrary-data-through-an-emoji/ | |
| function byteToVariationSelector(byte) { | |
| if (byte < 16) { | |
| return String.fromCodePoint(0xFE00 + byte); | |
| } else { | |
| return String.fromCodePoint(0xE0100 + (byte - 16)); | |
| } | |
| } | |
| function encode(base, str) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const yarnLockfile = require('@yarnpkg/lockfile'); | |
| function parseLockfile(filePath) { | |
| const file = fs.readFileSync(filePath, 'utf8'); | |
| return yarnLockfile.parse(file).object; | |
| } | |
| function getVersionDifferences(beforeLockfile, afterLockfile) { | |
| const diffs: Record<string, { before: string, after: string }> = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for file in *.HEIC; do sips -s format jpeg "$file" --out "${file%.*}.jpg"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://stackoverflow.com/a/67504622/51500 | |
| import { | |
| DependencyList, | |
| EffectCallback, | |
| useCallback, | |
| useEffect, | |
| useRef, | |
| } from "react"; | |
| import { debounce } from "lodash"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| wget http://downloads.sourceforge.net/ltp/lcov-1.14-1.noarch.rpm | |
| sudo yum localinstall lcov-1.14-1.noarch.rpm | |
| git clone --recursive https://github.com/RedisTimeSeries/RedisTimeSeries.git | |
| cd RedisTimeSeries | |
| sudo make setup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ############################################### | |
| # To use: | |
| # chmod +x install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| version=6.0.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Based on https://stackoverflow.com/questions/565535/mocking-a-url-in-java | |
| package com.example | |
| import java.io.InputStream | |
| import java.net.HttpURLConnection | |
| import java.net.URL | |
| class FakeResourceHttpURLConnection( | |
| url: URL, |
NewerOlder