Skip to content

Instantly share code, notes, and snippets.

View michaeltryby's full-sized avatar
🏠
Working from home

Michael Tryby michaeltryby

🏠
Working from home
  • Recovering Fed
  • East Falmouth, MA USA
View GitHub Profile
@michaeltryby
michaeltryby / sigpatch.zsh
Last active July 4, 2025 23:29
sigpatch fixes SIP-related Python crashes on macOS Sequoia and later
#!/usr/bin/env zsh
#
# sigpatch.zsh — Fix macOS SIP errors by ad-hoc signing unsigned Python native libraries
#
# Scans the active Conda environment for unsigned native libraries (.so/.dylib)
# and optionally ad-hoc signs them for compatibility with macOS SIP (e.g., Sequoia).
#
# Usage:
# ./sigpatch.zsh --audit # Scan and list unsigned libraries
@ibireme
ibireme / kpc_demo.c
Last active October 20, 2025 14:57
A demo shows how to read Intel or Apple M1 CPU performance counter in macOS.
// =============================================================================
// XNU kperf/kpc demo
// Available for 64-bit Intel/Apple Silicon, macOS/iOS, with root privileges
//
//
// Demo 1 (profile a function in current thread):
// 1. Open directory '/usr/share/kpep/', find your CPU PMC database.
// M1 (Pro/Max/Ultra): /usr/share/kpep/a14.plist
// M2 (Pro/Max): /usr/share/kpep/a15.plist
// M3: /usr/share/kpep/as1.plist
@bkaradzic
bkaradzic / orthodoxc++.md
Last active October 19, 2025 16:39
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@ticean
ticean / SVN_Git_Mirror.md
Created January 3, 2012 21:14
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@rampion
rampion / try-catch-ex.c
Created April 8, 2009 02:35
TRY/CATCH/FINALLY macros for C
// gcc -o try-catch-ex try-catch.c try-catch-ex.c
#include <stdio.h>
#include "try-catch.h"
// Example of use for try-catch.h
int main(int argc, char *argv[])
{
int i = 101;
printf("before try block...\n");