Skip to content

Instantly share code, notes, and snippets.

@orip
orip / worktrees.py
Created October 3, 2022 08:24
Simple git worktree filters in Python. Sample usage: `cd $(worktrees.py ~/myrepo max_path)`
#!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
from dataclasses import dataclass
@dataclass
@orip
orip / diff_big_sizes.py
Created October 6, 2022 21:30
Diff two runs of nm on similar executables to find large symbol size increases
#! /usr/bin/env python3
"""
Build to compare two outputs of this line on fairly identical executables
nm --print-size --radix=d <executable> | grep ' .* .* ' | cut -d' ' -f 2-10
To just see the top symbols, can run e.g
nm --print-size --size-sort --radix=d <executable>
"""
@orip
orip / orip_macbook_setup_tips.md
Created January 30, 2023 09:05
orip's MacBook setup tips

Install and manage utilities and applications

homebrew (https://brew.sh/)

Applications

Terminals

Standard option: iterm2

brew install iterm2
@orip
orip / log_http_headers.py
Last active February 19, 2024 13:42 — forked from phrawzty/2serv.py
simple python http server to dump request headers
#!/usr/bin/env python3
import http
import http.server
import socketserver
import sys
def _log(s):
print(s)