Skip to content

Instantly share code, notes, and snippets.

View dmezh's full-sized avatar
🔎

Dan Mezhiborsky dmezh

🔎
  • Bay Area
  • 23:53 (UTC -04:00)
View GitHub Profile
@dmezh
dmezh / convert-busmaster-to-candump.py
Created April 23, 2023 03:27
Convert busmaster log files to candump-style logs
import sys
import time
from datetime import datetime
converted = []
with open(sys.argv[1]) as f:
dump = f.readlines()
#[derive(Debug)]
struct I;
struct J {
things: Vec<I>,
}
impl J {
pub fn new() -> Self {
J { things: Vec::new() }
#[derive(Debug)]
struct I;
struct J {
things: Vec<I>,
}
impl J {
pub fn new() -> Self {
J { things: Vec::new() }
@dmezh
dmezh / git-pullall.sh
Last active September 18, 2022 16:27
#!/bin/bash
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do
git branch --track ${branch#remotes/origin/} $branch
done
git fetch --all
git pull --all