Skip to content

Instantly share code, notes, and snippets.


Ryan A. Pavlik rpavlik

View GitHub Profile
# SPDX-FileCopyrightText: 2020-2021, Ryan Pavlik
# SPDX-License-Identifier: CC0-1.0
# Nothing sh-specific here, these work fine in pwsh as well
# Mostly about remote handling
git config --global alias.rup "remote update --prune"
git config --global "push --force-with-lease"
git config --global pull.ff only
git config --global commit.verbose true
rpavlik /
Last active May 18, 2022
Windows Dev VM in libvirt

One time

  • Build rhsrvany using a windows toolchain like i686-w64-mingw32, and put the resulting rhsrvany.exe and pnp_wait.exe in /usr/share/virt-tools (or see for a debian package of it)
    • git clone
    • cd rhsrvany
    • autoreconf -i -f
    • ./configure --host=i686-w64-mingw32
    • make
  • sudo mkdir -p /usr/share/virt-tools
rpavlik /
Last active Apr 3, 2020
Ryan's Trusted 3D Printing People
rpavlik / PRs merged into my master
Last active Mar 25, 2020
vcglib custom master description
View PRs merged into my master

Upstream of vcglib is not as quick on reviews, so I've merged some things that look pretty safe (or important) into master on my fork:

rpavlik /
Last active Oct 27, 2021
Debian packaging notes

These are my personal notes on how to handle Debian packaging best locally. Naturally they aren't authoritative, and I may have "missed a memo" - if so, let me know!

  • New package
    • git init
    • gbp import-orig ...
    • debmake
  • Clean up and edit
    • cme edit dpkg
  • see
rpavlik / out_camera_data.xml
Created Nov 8, 2019
Calibration file for a wide-angle ELP board-level camera
View out_camera_data.xml
<?xml version="1.0"?>
<calibration_time>"Thu 07 Nov 2019 05:21:22 PM CST"</calibration_time>
rpavlik / iteration.h
Created Sep 10, 2019
some c++ iteration utilities
View iteration.h
// Helpers for iteration.
#include "solvespace.h"
namespace SolveSpace {
rpavlik /
Last active Jul 31, 2019
Spec and registry diffs between OpenXR 0.90 and 1.0

These are not exactly the released versions: I pre-processed them slightly to reduce diff noise, then ran the spec sources through to produce a single adoc file for each spec version. I then used git diff --patience on the combined adoc file and the XML registry.

As an obligatory note, these diffs aren't an official product of the working group, and they are not normative.

As diffs of the spec components, they carry the same license as those spec components.

rpavlik /
Created Mar 1, 2018
Reading 24xx i2c eeprom using rpi or other linux board
# Make sure you have i2c-dev loaded and set up for whatever interface you're using
# This is the right one for the default rpi interface.
cd /sys/class/i2c-adapter/i2c-1/
# Instantiate a new device at runtime
# use the right generic chip name (24cSOMETHING) - don't screw this up! see
# table at
# description further up at
# and info about what this command actually does at
echo 24c16 0x50 | sudo tee new_device
rpavlik /
Created Feb 24, 2018
Find some installed packages and get just their names, suffixed by a forced version.
# for instance, for fixing/removing a botched locally-build kernel.
dpkg -l|grep "bpo9+1.1" | sed -r 's/ii\s+(\S+).*/\1=4.14.13-1~bpo9+1/' | xargs echo