Skip to content

Instantly share code, notes, and snippets.


Ryan A. Pavlik rpavlik

View GitHub Profile
rpavlik / fonts.ps1
Last active May 18, 2022
basic system setup
View fonts.ps1
$FontRelease = "2111.01"
$FontArchive = "CascadiaCode-${FontRelease}.zip"
wget.exe "$FontRelease/$FontArchive"
# -aoa = always overwrite
7z x -oCascadiaCode -aoa "${FontArchive}"
$fonts = (New-Object -ComObject Shell.Application).Namespace(0x14)
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
# 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 / fix_homebrew.rb
Created Jan 6, 2011 — forked from mxcl/install_homebrew.markdown
Fix permissions on /usr/local for Homebrew
View fix_homebrew.rb
# This script fixes /usr/local only.
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
rpavlik / GetRenderManager.cmd
Last active Feb 23, 2022
Batch script for keeping an up-to-date local copy of the latest 32 and 64-bit continuous builds of OSVR RenderManager and OSVR Core
View GetRenderManager.cmd
@echo off
rem By Ryan Pavlik, Sensics, Inc. <>
rem Copyright 2015-2016 Sensics, Inc.
rem SPDX-License-Identifier: Apache-2.0
rem Put this in a directory of its own, preferably. It will create one file and two subdirectories.
rem Doesn't hurt to run it more often than there are builds: it won't re-download (though
rem it will harmlessly re-extract)
rem Requires that you have wget and 7za (the command line version of 7z) in your path.
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 / ring-buffer-with-all-iterators.h
Last active Dec 7, 2021
Ring buffer impl with all iterators
View ring-buffer-with-all-iterators.h
// Copyright 2021, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
* @file
* @brief Ringbuffer implementation for keeping track of the past state of things
* @author Ryan Pavlik <>
* @author Moses Turner <>
* @ingroup aux_util
rpavlik /
Created Nov 30, 2021
Adafruit EyeLights Digital Rain
# SPDX-FileCopyrightText: 2021 Phil Burgess for Adafruit Industries
# SPDX-FileCopyrightText: 2021, Ryan Pavlik <>
# SPDX-License-Identifier: MIT
import math
import random
import time
from supervisor import reload
import board
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 / rules.txt
Created Jan 5, 2018
Stop CNet Auto-Play Videos
View rules.txt
! 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*.m3u8?device=ott*
! Block the script that loads the playlists
! Element hiding: hide the now-useless placeholder