Skip to content

Instantly share code, notes, and snippets.

View methylDragon's full-sized avatar
🔥
Somewhere up there

methylDragon methylDragon

🔥
Somewhere up there
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

@methylDragon
methylDragon / gen.py
Created August 15, 2024 06:58
Extract ROS interface package type descriptions as JSON files
"""
Generate type descriptions for ROS interface packages as JSON files!
Usage: (Remember to source your ROS distro first!)
```
# Generate type description for a single ROS interface
python3 gen.py --interface_type <pkg>/(msg|srv)/<type>
# Generate type description for all ROS interfaces in a package
python3 gen.py --target_package <pkg_name>
@methylDragon
methylDragon / odr_fix.repos
Last active April 8, 2023 00:23
REP-2011 Dynamic Typesupport Repos
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: rolling
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: rolling
ament/ament_lint:
@methylDragon
methylDragon / gazebodistro_topo_parser.py
Last active April 18, 2022 17:58
Get topologically sorted level-groups for packages and their dependents on gazebodistro (Place script in gazebodistro root and run)
import yaml
import os
import re
from collections import defaultdict
# PARAMS ===========================================================================================
PATH = "."
BUMP_TARGETS = ["ign-cmake", "ign-tools", "ign-plugin", "ign-utils"]
@methylDragon
methylDragon / mp_with_manager.py
Created December 27, 2021 07:36
Python3 Multiprocessing Skeleton with Data Sharing
import multiprocessing as mp
import time
def producer(shared, end_event):
count = 0
while not end_event.is_set():
time.sleep(1/30)
count += 1