Skip to content

Instantly share code, notes, and snippets.

View arjo129's full-sized avatar
💭
🦀

Arjo Chakravarty arjo129

💭
🦀
View GitHub Profile
@methylDragon
methylDragon / README.md
Last active January 6, 2026 21:51
Git utilities

Git Stack Utilities

A collection of scripts to wrangle branches, especially in a stacked-diff context in repos where the main branch keeps updating.

These scripts handle "obsolete" commits, merged commits, and branching histories relatively intelligently. Stack structure and branching are preserved, and any rebase issues are flagged and gracefully aborted for that stack.

Requirements: Git 2.38+ (relies on rebase --update-refs).

Setup

------------------------------- MODULE hanoi -------------------------------
EXTENDS Integers, Sequences
\* Towers of hanoi problem
VARIABLES tower1, tower2, tower3
\* Initiallize the towers
Init == /\ tower1 = <<3,2,1,0>>
/\ tower2 = <<0>>
/\ tower3 = <<0>>
\* Transition rules
@chewwt
chewwt / chat.msg
Last active August 21, 2018 07:14 — forked from spaghetti-/chat.msg
std_msgs/Header header
std_msgs/String source_id
std_msgs/String message
@codebrainz
codebrainz / main.c
Created June 23, 2015 02:48
List include files using libclang
#include <stdio.h>
#include <stdlib.h>
#include <clang-c/Index.h>
enum CXChildVisitResult
onVisitCursor(CXCursor cursor, CXCursor parent, CXClientData client_data)
{
if (clang_getCursorKind(cursor) == CXCursor_InclusionDirective) {
CXFile file = clang_getIncludedFile(cursor);