Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

— jed dapperfu

💭
I may be slow to respond.
  • Michigan
View GitHub Profile
@dapperfu
dapperfu / gist:2e40f774204a55e86993a6875517ed5d
Created Aug 18, 2020
Batch Convert .MFC to .MF4 (MDF) files from CSS Electronics CAN Edge 2 in Linux.
View gist:2e40f774204a55e86993a6875517ed5d
# CSS Electronics
# CAN Edge 2
# Convert all .MFC found MFC files using all cores of the computer.
# Replace -P8 with the number of cores/threads.
find . -name "*.MFC" | xargs -n1 -P8 mdf2finalized --name "" --verbose 5 -i
View gist:93a6184421e07185053210cbf03031a9
echo "set prefix C-a" >> ~/.tmux.conf
tmux source-file ~/.tmux.conf
@dapperfu
dapperfu / gist:426a60313f21fa57e69c55dcb6f14344
Last active Oct 2, 2020
Ubuntu 20.04 new install fails to boot if install disk was previously part of a ZFS pool.
View gist:426a60313f21fa57e69c55dcb6f14344

Issue

Ubuntu 20.04 will fail to boot if you install to a disk that was previously part of a ZFS pool.

A fresh Ubuntu 20.04 install will drop to (initramfs) prompt without much indication of why it failed.

mount has an issue where it doesn't automatically detect the file system (ext4). wipefs shows left over ZFS settings.

Resolution

@dapperfu
dapperfu / Makefile
Created Jun 10, 2020
Notebook to Docs.
View Makefile
# Python Bits
VENV = /tmp/Kalman-and-Bayesian-Filters-in-Python
.PHONY: venv
venv: ${VENV}
${VENV}:
@python3.8 -mvenv ${@}
@${VENV}/bin/pip install --upgrade pip setuptools wheel
@${VENV}/bin/pip install --upgrade --requirement requirements.txt
@dapperfu
dapperfu / Ubuntu20.04 ZFS on Root.md
Last active May 12, 2020
Lessons learned from Ubuntu 20.04 [Focal Fossa] ZFS-on-Root.
View Ubuntu20.04 ZFS on Root.md
View gist:df049955dc76fca8c5373eea63a0a7d4
screen -dmS screen_name bash -c 'ls; exec bash'
screen -S screen_name -x -X screen bash -c 'ls; exec bash'
screen -S screen_name -x -X screen bash -c 'ls; exec bash'
screen -S ${ -x -X screen bash -c 'ls; exec bash'
@dapperfu
dapperfu / algebra2.m
Created Feb 16, 2020
Learning Matlab through Algebra examples.
View algebra2.m
%% Multiplying a Matrix by Another Matrix
% https://www.mathsisfun.com/algebra/matrix-multiplying.html
% But to multiply a matrix by another matrix we need to
% do the "dot product" of rows and columns ...
% what does that mean? Let us see with an example:
% Method 1: Using MATLAB.
A = [1 2 3
4 5 6]
@dapperfu
dapperfu / install.sh
Created Feb 2, 2020
Install inkcut with pipx
View install.sh
pipx install inkcut
pipx runpip inkcut install pyside2 pyqt5
@dapperfu
dapperfu / Makefile
Created Jan 29, 2020
kitti database downloader.
View Makefile
ZIP+=data_object_image_2.zip
ZIP+=data_object_image_3.zip
ZIP+=data_object_prev_2.zip
ZIP+=data_object_prev_3.zip
ZIP+=data_object_velodyne.zip
ZIP+=data_object_calib.zip
ZIP+=data_object_label_2.zip
ZIP+=devkit_object.zip
ZIP+=models_lsvm.zip
ZIP+=data_object_det_2.zip
@dapperfu
dapperfu / gist:b00d91845ebd77f2a403842ab3d4c614
Created Sep 4, 2019
Passing a (const char *) in ctypes.
View gist:b00d91845ebd77f2a403842ab3d4c614
dll = canape.dll
hdl = canape.handle
directory = ctypes.create_string_buffer(b"", 256)
size = ctypes.c_ulong()
# Asap3GetProjectDirectory
dll.Asap3GetProjectDirectory.argtypes=(TAsap3Hdl, ctypes.POINTER(type(directory)), ctypes.POINTER(ctypes.c_ulong))
dll.Asap3GetProjectDirectory.restype=ctypes.c_bool
result = dll.Asap3GetProjectDirectory(
hdl,