Skip to content

Instantly share code, notes, and snippets.

View rpavlik's full-sized avatar

Rylie Pavlik rpavlik

View GitHub Profile
@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"
},
@rpavlik
rpavlik / rules.txt
Created January 5, 2018 16:13
Stop CNet Auto-Play Videos
! Block annoying CNet auto-play videos.
! Tried to make it targeted so that if you actually wanted to watch a video, you could...
! Tested/works with uBlock Origin
! Block the playlist
www.cnet.com/videos/manifest/*.m3u8?device=ott*
! Block the script that loads the playlists
*.cbsistatic.com/fly/js/pages/desktop/article_video_test*.js
! Element hiding: hide the now-useless placeholder
www.cnet.com##.entered.dock.inviewElement
@rpavlik
rpavlik / CMakeLists.txt
Created September 12, 2017 17:48
Requesting C++14 and C11
cmake_minimum_required(VERSION 3.1.0)
project(my-project)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)