Skip to content

Instantly share code, notes, and snippets.

@xrl
xrl / uber-profiling-observabilitycon-2026.txt
Created October 20, 2026 23:01
Uber profiling talk notes — ObservabilityCON 2026
Uber profiling: sample distilled from 10 actual slide photos
Chris Zhang, Uber | ObservabilityCON | October 20, 2026
The main idea: always-on profiles expose expensive code that alerts and traces can miss. Coverage, safe rollout, and a fast off switch matter as much as the profiler. The slides report profiling wins, then separately propose an unpublished autonomous optimization design.
- Metrics show something is slow; traces locate the service; profiles identify the function/line. Example: encodeResponse(), handler.go:142. [p02]
- Random 1% sampling can miss small services. The photographed snapshot has 100 services, 11,710 instances, and 13 zones; the median service has 17 instances, and 76% have fewer than 50. [p01, p04]
- Enabling Cadence mutex profiling reportedly crashed every instance because of an outdated dependency's hand-written assembly. A global switch disabled it within minutes; it returned after the dependency upgrade. [p05]
- One line reportedly accounted for 1.6% of service CPU, about 530 c
@xrl
xrl / .gitignore
Last active October 16, 2026 05:16
OpenAI treats TUIs and real developer workflows like an afterthought. So we reverse-engineered Codex Cloud into a Claude Code skill.
__pycache__/
*.py[cod]
@xrl
xrl / README.md
Last active September 13, 2026 04:02
claude-boot: brew-upgrade Claude Code before it launches, then exec into it with your args

claude-boot

Upgrades a Homebrew-installed Claude Code before it launches, then execs into it with your args intact. When the "Update available! Run: brew upgrade claude-code@latest" notice shows up, quit and claude --resume: you land back in the same session on the new version.

Install

mkdir -p ~/.local/bin
curl -fsSL https://gist.githubusercontent.com/xrl/0fe06cc8c78e0859fc228b38cb33ec81/raw/claude-boot -o ~/.local/bin/claude-boot
chmod +x ~/.local/bin/claude-boot
@xrl
xrl / finicky-firefox-profiles.md
Last active April 9, 2026 11:46
Using Finicky to route URLs to different Firefox profiles (with the new profile system)

Using Finicky to Route URLs to Different Firefox Profiles (2026)

Background: What is Finicky?

Finicky is a macOS app that acts as your default browser. When you click a link anywhere on your system (Slack, email, terminal, etc.), Finicky intercepts it, evaluates rules from ~/.finicky.js, and opens the URL in the right browser — or the right profile of a browser.

This is useful when you work across multiple organizations and want to keep sessions, cookies, and bookmarks separated.

Finicky's official documentation covers the profile property for Chromium browsers only (e.g. browser: { name: "Google Chrome", profile: "Work" }). Firefox profile routing is undocumented, and the args property that makes it possible isn't mentioned in the wiki at all. This guide fills that gap.

@xrl
xrl / README.md
Last active September 20, 2026 20:46
Quickwit+Vector for Kubernetes (EKS-flavored) Observability
@xrl
xrl / build
Created October 3, 2023 17:05
rdkit-autocxx-repro on mac
% cargo clean; cargo build
Compiling libc v0.2.148
Compiling proc-macro2 v1.0.67
Compiling unicode-ident v1.0.12
Compiling memchr v2.6.3
Compiling syn v1.0.109
Compiling rustix v0.38.14
Compiling version_check v0.9.4
Compiling bitflags v2.4.0
Compiling either v1.9.0
// FROM /opt/homebrew/include/rdkit/GraphMol/ROMol.h
//
// Copyright (C) 2003-2022 Greg Landrum and other RDKit contributors
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
@xrl
xrl / lease.rs
Created July 30, 2021 20:58
Using rust kube-rs to check, poll, and renew advisory locks in Kubernetes
use k8s_openapi::api::coordination::v1::{Lease as KubeLease, LeaseSpec as KubeLeaseSpec};
use chrono::{Local, Utc};
use k8s_openapi::apimachinery::pkg::apis::meta::v1::MicroTime;
use std::time::Duration;
use kube::api::{PatchParams, PostParams, ObjectMeta};
use kube::Api;
use tokio::task::JoinHandle;
use tokio::sync::oneshot::Sender;
const LEASE_DURATION_SECONDS: u64 = 5;
@xrl
xrl / audit.py
Created February 22, 2019 01:34
#!/usr/bin/env python
import json
import subprocess
import pprint
###
### Compare the EC2 state with that state of pods in your kube cluster
### Loads from EC2 with the awscli and loads from kube with kubectl
###
@xrl
xrl / kops-formula.rb
Created January 18, 2018 20:10
kops formula for vpc connections
class Kops < Formula
desc "Production Grade K8s Installation, Upgrades, and Management"
homepage "https://github.com/kubernetes/kops"
url "https://github.com/kubernetes/kops/archive/1.7.1.tar.gz"
sha256 "044c5c7a737ed3acf53517e64bb27d3da8f7517d2914df89efeeaf84bc8a722a"
head "https://github.com/tureus/kops.git", :revision => "1.6.2-allow-no-igw"
# head "https://github.com/k8s-for-greeks/kops.git", :revision => "k8s-for-greeks-integration"
bottle do
cellar :any_skip_relocation