Skip to content

Instantly share code, notes, and snippets.

@jamesob
jamesob / syncthing-audit.md
Created July 8, 2026 14:52
syncthing audit by GLM-5.2 selfhosted

Syncthing Security Audit — Executive Summary

Repository audited: https://github.com/syncthing/syncthing Date: 2026-07-08 Methodology: Full file-by-file review of the source tree by four parallel read-only security auditor agents, each assigned a balanced batch of files (~599 source files total across cmd/, internal/, lib/, gui/, meta/, script/, test/, and root build files). Each agent read every file in its batch and looked for backdoors, data exfiltration, and suspicious security weaknesses in the context of the project as a whole.


Top-line verdict

#!/usr/bin/env bash
set -euo pipefail
die() { echo "error: $*" >&2; exit 1; }
# --- Check prerequisites ---
command -v nvcc >/dev/null 2>&1 || {
if [[ -x /usr/local/cuda/bin/nvcc ]]; then
export PATH=/usr/local/cuda/bin:$PATH
else
#!/bin/bash
IMAGE_NAME="claude-code-runner"
CONTAINER_NAME="claude-code-$(basename $(pwd))"
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Parse arguments
@jamesob
jamesob / claude-sandbox.sh
Created January 19, 2026 17:29
claude sandbox
#!/bin/bash
IMAGE_NAME="claude-code-runner"
CONTAINER_NAME="claude-code-$(basename $(pwd))"
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Parse arguments
@jamesob
jamesob / 00_output.txt
Last active July 11, 2025 19:44
Output creation by address type over the last 30 days
Connected to Bitcoin node. Current block height: 905108
Analyzing last 12960 blocks...
Starting from block: 00000000000000000000e9900f08f6dc109762d09d4d0b31b8ece5ab35a5401e
Processing block 12960/12960...
Processed 12960 blocks
============================================================
Bitcoin Address Type Analysis
============================================================
Total Value Analyzed: 53757862.95514309 BTC
@jamesob
jamesob / bench.cpp
Last active April 15, 2025 18:03
Sig validation vs. hash time
#include <iostream>
#include <vector>
#include <random>
#include <chrono>
#include <iomanip>
#include <cassert>
// Include libsecp256k1
#include <secp256k1.h>
#include <iostream>
#include <format>
#include <cstring>
#include <vector>
#include <thread>
#include <random>
#include <chrono>
#include <secp256k1.h>
constexpr size_t NUM_KEYS = 6'500'000;
@jamesob
jamesob / 2024-cov-prefs.md
Created December 13, 2024 01:58
Covenants support 2024

Prelude

Soft forks tighten the rule set of what transactions are valid. Additional opcodes allow existing owners of coins to put additional constraints on how those coins are spent.

Many covenant-enabling opcodes are nothing more than "new", more specific sighashes[^sigh]. Other opcodes allow access to information about a spending transaction.

None of this is conceptually objectionable. People should be able to put constraints on their property. But first we must do no harm.

The concrete issues, when gauging additional script functionality, are:

@jamesob
jamesob / install-steps.sh
Last active March 3, 2026 19:21
Getting to Android and react-native development in Arch Linux (2024)
# This (very scant) guide allows you to do Android and react-native development on Linux by
# running the android emulator in a container.
# install yay via AUR
git clone https://aur.archlinux.org/yay.git && cd yay && makpkg -si
# install all android dev packages per https://wiki.archlinux.org/title/Android
yay -Sy android-sdk-cmdline-tools-latest android-sdk-build-tools android-sdk-platform-tools android-platform
# add to .zshrc
$ make clean && ./configure && make clean && make && SECP256K1_BENCH_ITERS=200000 ./bench verify sign
Benchmark , Min(us) , Avg(us) , Max(us)
ecdsa_verify , 71.5 , 71.5 , 71.5
ecdsa_sign , 54.8 , 54.9 , 54.9
schnorrsig_sign , 41.9 , 41.9 , 41.9
schnorrsig_verify , 72.6 , 72.6 , 72.6