Skip to content

Instantly share code, notes, and snippets.

View rpavlik's full-sized avatar

Rylie Pavlik rpavlik

View GitHub Profile
@rpavlik
rpavlik / winvm.md
Last active December 3, 2022 03:17
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 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 April 3, 2020 14:32
Ryan's Trusted 3D Printing People
@rpavlik
rpavlik / PRs merged into my master branch.md
Last active March 25, 2020 15:31
vcglib custom master description

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 March 12, 2024 21:54
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
rpavlik / out_camera_data.xml
Created November 8, 2019 15:20
Calibration file for a wide-angle ELP board-level camera
<?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 September 10, 2019 23:31
some c++ iteration utilities
//-----------------------------------------------------------------------------
// Helpers for iteration.
//-----------------------------------------------------------------------------
#ifndef SOLVESPACE_ITERATION_H
#define SOLVESPACE_ITERATION_H
#include "solvespace.h"
namespace SolveSpace {
@rpavlik
rpavlik / 1-README.md
Last active July 31, 2019 14:00
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 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 March 1, 2018 17:24
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 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 February 24, 2018 21:59
Find some installed packages and get just their names, suffixed by a forced version.
#!/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
@rpavlik
rpavlik / makerbot_rep2x_1st.def.json
Last active October 17, 2022 19:32 — forked from d235j/makerbot_rep2x_1st.def.json
Replicator 2X Cura definition - slightly tweaked for my printer, which is running Sailfish
{
"id": "makerbot_rep2x_1st",
"version": 2,
"name": "Rep2X Right Extruder",
"inherits": "fdmextruder",
"metadata": {
"machine": "makerbot_replicator_2x",
"position": "0"
},