Skip to content

Instantly share code, notes, and snippets.

View rpavlik's full-sized avatar

Rylie Pavlik rpavlik

View GitHub Profile
@rpavlik
rpavlik / step1-alternate.ps1
Last active March 10, 2024 20:00
Linux name change
# from https://askubuntu.com/a/1363020
wsl -l -v
wsl --terminate Debian # <distro> from the previous command
wsl -u root -d Debian # "-d <distro>" is only needed for non-default instances
# Now from in WSL
usermod -l rylie ryan
# Optionally change the home directory name to match
usermod -d /home/rylie -m rylie
# Optionally change the group name to match
@rpavlik
rpavlik / scrollbars.css
Created October 13, 2023 17:49
Less sucky scrollbars in webkit/electron apps
/* inspired by https://artemis.sh/2023/10/12/scrollbars.html and https://gist.github.com/devinrhode2/2573411 */
/* tested out in logseq since it lets you monkey with the CSS of the app live. */
html ::-webkit-scrollbar {
width: 15px;
background-color: #333;
-webkit-border-radius: 100px;
}
html ::-webkit-scrollbar-thumb:vertical {
background-color: #aaa;
@rpavlik
rpavlik / blinky-digital-rain.py
Created May 9, 2023 22:54
AdaFruit LED Glasses Digital Rain, plus Blinky
# SPDX-FileCopyrightText: 2021-2023 Ryan Pavlik
#
# A little bit of board setup based on code that is:
#
# SPDX-FileCopyrightText: 2021 Phil Burgess for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
Display 'digital rain' aka 'the Matrix thing' on the Adafruit LED Glasses,
https://www.adafruit.com/product/5255
@rpavlik
rpavlik / keybase.md
Created February 8, 2023 15:54
keybase.md

Keybase proof

I hereby claim:

  • I am rpavlik on github.
  • I am ryanpavlik (https://keybase.io/ryanpavlik) on keybase.
  • I have a public key whose fingerprint is C076 38BF B23D 7D99 21EE 9696 CBC5 5E3D 986A 54C7

To claim this, I am signing this object:

@rpavlik
rpavlik / pretty-registry-xml.json
Last active January 20, 2023 16:57
PrettyRegistryXML manifest for Scoop
{
"version": "3.3.0",
"description": "A tool used to automatically format the OpenXR XML registry.",
"homepage": "https://github.com/rpavlik/PrettyRegistryXml",
"license": "MIT AND Apache-2.0",
"architecture": {
"64bit": {
"url": "https://github.com/rpavlik/PrettyRegistryXml/releases/download/v3.3.0/PrettyRegistryXml-Windows-3.3.0.7z",
"hash": "429eb0997e83d0f0df681bbda2b74123cc4671cfb2b86daeb3df269e94ea2622",
"extract_dir": "PrettyRegistryXml-Windows-3.3.0"
@rpavlik
rpavlik / code.py
Created October 28, 2022 21:53
creature eyes mqtt
# SPDX-FileCopyrightText: 2020 Phillip Burgess for Adafruit Industries
# SPDX-FileCopyrightText: 2021-2022 Ryan Pavlik <ryan@ryanpavlik.com>
#
# SPDX-License-Identifier: MIT
"""
RASTER EYES for Adafruit Matrix Portal: animated spooky eyes.
Updated by Ryan to hide the head fully and have MQTT control
"""
@rpavlik
rpavlik / install-fonts.ps1
Created July 22, 2022 15:36
sample powershell script to install fonts
# Note that there is actually a "fonts" bucket in scoop that makes this obsolete in this specific case
$FontRelease = "2111.01"
$FontArchive = "CascadiaCode-${FontRelease}.zip"
wget.exe "https://github.com/microsoft/cascadia-code/releases/download/v$FontRelease/$FontArchive"
# -aoa = always overwrite
7z x -oCascadiaCode -aoa "${FontArchive}"
# https://blog.simontimms.com/2021/06/11/installing-fonts/
$fonts = (New-Object -ComObject Shell.Application).Namespace(0x14)
@rpavlik
rpavlik / ring-buffer-with-all-iterators.h
Last active December 7, 2021 21:41
Ring buffer impl with all iterators
// 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 <ryan.pavlik@collabora.com>
* @author Moses Turner <moses@collabora.com>
* @ingroup aux_util
*/
@rpavlik
rpavlik / code.py
Created November 30, 2021 15:24
Adafruit EyeLights Digital Rain
# SPDX-FileCopyrightText: 2021 Phil Burgess for Adafruit Industries
# SPDX-FileCopyrightText: 2021, Ryan Pavlik <ryan.pavlik@gmail.com>
#
# SPDX-License-Identifier: MIT
import math
import random
import time
from supervisor import reload
import board
@rpavlik
rpavlik / adafruit_displayio_sh1107_wrapper.py
Last active August 13, 2021 17:02
Adafruit MacroPad with my mods
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2020 Mark Roberts for Adafruit Industries
# SPDX-FileCopyrightText: 2021 James Carr
# SPDX-FileCopyrightText: 2021 Ryan Pavlik
#
# SPDX-License-Identifier: MIT
"""
`adafruit_displayio_sh1107_wrapper`
================================================================================