Skip to content

Instantly share code, notes, and snippets.

View prenaissance's full-sized avatar
😎
B)

Alex prenaissance

😎
B)
View GitHub Profile
@prenaissance
prenaissance / spanner_emulator_pg_on_m4.md
Created February 17, 2025 16:00
Spanner Emulator PG Adapter on M4 Macs

JVM containers are crashing on M4 Macbooks. This causes the PG Adapter for Cloud Spanner to crash and makes running the proxy impossible on ARM64. This gist explores how to overcome this by emulating x86 using Rosetta.

Pre-requisites:

  1. Enable Rosetta 2
softwareupdate --install-rosetta

The output logs should end with the line

@prenaissance
prenaissance / main.ts
Created November 13, 2024 12:03
BlueSky check handle availability
import { promisify } from "node:util";
const BATCH_SIZE = 1;
const TIMEOUT = 2000;
const verifyHandle = async (handle: string) => {
const url = `https://bsky.social/xrpc/com.atproto.server.createAccount`;
const response = await fetch(url, {
method: "POST",