Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan A. Pavlik rpavlik

View GitHub Profile
View git-prep.sh
#!/bin/sh
# 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 alias.pf "push --force-with-lease"
git config --global pull.ff only
git config --global commit.verbose true
@rpavlik
rpavlik / winvm.md
Last active May 18, 2022
Windows Dev VM in libvirt
View winvm.md

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 https://salsa.debian.org/rpavlik/rhsrvany for a debian package of it)
    • git clone https://github.com/rwmjones/rhsrvany.git
    • cd rhsrvany
    • autoreconf -i -f
    • ./configure --host=i686-w64-mingw32
    • make
  • sudo mkdir -p /usr/share/virt-tools
@rpavlik
rpavlik / 3d-printing-links.md
Last active Apr 3, 2020
Ryan's Trusted 3D Printing People
View 3d-printing-links.md
@rpavlik
rpavlik / PRs merged into my master branch.md
Last active Mar 25, 2020
vcglib custom master description
View PRs merged into my master branch.md

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: https://github.com/rpavlik/vcglib

@rpavlik
rpavlik / notes.md
Last active Oct 27, 2021
Debian packaging notes
View notes.md

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
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"?>
<opencv_storage>
<calibration_time>"Thu 07 Nov 2019 05:21:22 PM CST"</calibration_time>
<nr_of_frames>25</nr_of_frames>
<image_width>1600</image_width>
<image_height>1200</image_height>
<board_width>9</board_width>
<board_height>6</board_height>
<square_size>1.6210000030696392e-03</square_size>
<fix_aspect_ratio>1.</fix_aspect_ratio>
@rpavlik
rpavlik / iteration.h
Created Sep 10, 2019
some c++ iteration utilities
View iteration.h
//-----------------------------------------------------------------------------
// Helpers for iteration.
//-----------------------------------------------------------------------------
#ifndef SOLVESPACE_ITERATION_H
#define SOLVESPACE_ITERATION_H
#include "solvespace.h"
namespace SolveSpace {
@rpavlik
rpavlik / 1-README.md
Last active Jul 31, 2019
Spec and registry diffs between OpenXR 0.90 and 1.0
View 1-README.md

These are not exactly the released versions: I pre-processed them slightly to reduce diff noise, then ran the spec sources through https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/scripts/asciidoc-coalescer.rb 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
rpavlik / script.sh
Created Mar 1, 2018
Reading 24xx i2c eeprom using rpi or other linux board
View script.sh
# 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 https://elixir.bootlin.com/linux/v4.14.18/source/drivers/misc/eeprom/at24.c#L136
# description further up at https://elixir.bootlin.com/linux/v4.14.18/source/drivers/misc/eeprom/at24.c#L30
# and info about what this command actually does at
# https://elixir.bootlin.com/linux/v4.14.18/source/Documentation/i2c/instantiating-devices#L207
echo 24c16 0x50 | sudo tee new_device
@rpavlik
rpavlik / shell.sh
Created Feb 24, 2018
Find some installed packages and get just their names, suffixed by a forced version.
View shell.sh
#!/bin/sh
# 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