Skip to content

Instantly share code, notes, and snippets.

View alan707's full-sized avatar

Alan Mond alan707

View GitHub Profile
@alan707
alan707 / output.sh
Created June 24, 2018 20:39
odrivetool crashed out
In [3]: quit()
^CException ignored in: <module 'threading' from '/usr/lib/python3.5/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 1288, in _shutdown
t.join()
File "/usr/lib/python3.5/threading.py", line 1054, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
@alan707
alan707 / can_bridge.py
Last active December 21, 2020 04:08
Simple Python CAN Bridge (a.k.a CAN Gateway)
import can
from time import sleep
can_bus_a = can.Bus('can0', bustype='socketcan')
can_bus_b = can.Bus('can1', bustype='socketcan')
try:
for message in can_bus_a:
can_bus_b.send(message)
@alan707
alan707 / rebase_branches.sh
Last active April 6, 2023 21:00
Rebase branch names on top of develop
#!/bin/bash
usage() {
echo "Usage: $0 [branch1 branch2 branch3 ...] or $0 [branches.txt]"
echo "Arguments:"
echo " branch1 branch2 branch3 ... : A list of branch names separated by spaces"
echo " branches.txt : A text file containing branch names, one per line"
echo "Rebases the specified branches on top of the 'develop' branch and asks for confirmation to force push them to the origin."
}