Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan A. Pavlik rpavlik

View GitHub Profile
@rpavlik
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 <ryan.pavlik@collabora.com>
* @author Moses Turner <moses@collabora.com>
* @ingroup aux_util
*/
@rpavlik
rpavlik / code.py
Created Nov 30, 2021
Adafruit EyeLights Digital Rain
View code.py
# 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 Aug 13, 2021
Adafruit MacroPad with my mods
View adafruit_displayio_sh1107_wrapper.py
# 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`
================================================================================
@rpavlik
rpavlik / code.py
Last active Jul 31, 2021
MagTag CovidActNow
View code.py
# Adapted from SpaceX Launch Display example
# SPDX-FileCopyrightText: Anne Barela November 2020, for Adafruit Industries LLC
# SPDX-FileCopyrightText: 2020-2021, Ryan Pavlik
# SPDX-License-Identifier: MIT
import time
import terminalio
from adafruit_magtag.magtag import MagTag
from secrets import secrets
@rpavlik
rpavlik / cs-unc-tr-to-ris-zotero.sh
Last active Jul 14, 2021
Get the UNC CS dept tech report list and convert for zotero import
View cs-unc-tr-to-ris-zotero.sh
#!/usr/bin/env bash
# Copyright 2021, Collabora, Ltd.
# SPDX-License-Identifier: MIT
#
# needs bibutils and sed and wget on debian.
# Import the resulting .ris file into zotero and enjoy!
# References:
# https://en.wikipedia.org/wiki/EndNote#Tags_and_fields
# https://en.wikipedia.org/wiki/RIS_(file_format)#Tags
View errors-4.2.0.txt
Executing tasks: [:app:assembleDebug] in project /home/ryan/AndroidStudioProjects/PrefabProblem
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:dataBindingMergeDependencyArtifactsDebug
> Task :app:dataBindingMergeGenClassesDebug
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
@rpavlik
rpavlik / setup.ps1
Last active Oct 18, 2021
basic system setup
View setup.ps1
# install scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb get.scoop.sh | iex
# install some basics
scoop install git pwsh
scoop bucket add rp-scoops https://github.com/rpavlik/rp-scoops
scoop bucket add extras
@rpavlik
rpavlik / aq-funhouse.py
Last active Aug 1, 2021
air quality on funhouse/clue
View aq-funhouse.py
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
# SPDX-FileCopyrightText: 2021, Ryan Pavlik <ryan.pavlik@gmail.com>
# SPDX-License-Identifier: MIT
try:
from typing import Optional
except ImportError:
pass
@rpavlik
rpavlik / WindowsRX580.md
Created Nov 19, 2020
Ryan's available vulkan extensions
View WindowsRX580.md
  • Instance Extensions: count = 11
    • VK_EXT_debug_report : extension revision 9
    • VK_EXT_debug_utils : extension revision 2
    • VK_EXT_swapchain_colorspace : extension revision 4
    • VK_KHR_device_group_creation : extension revision 1
    • VK_KHR_external_fence_capabilities : extension revision 1
    • VK_KHR_external_memory_capabilities : extension revision 1
    • VK_KHR_external_semaphore_capabilities : extension revision 1
    • VK_KHR_get_physical_device_properties2 : extension revision 2
    • VK_KHR_get_surface_capabilities2 : extension revision 1
@rpavlik
rpavlik / win-terminal-git-bash.json
Last active Aug 7, 2020
Git Bash option for recent Windows Terminal
View win-terminal-git-bash.json
[
{},
{
"guid": "{0ccdb49b-c762-4bd6-99f4-9f85e25ffea1}",
"closeOnExit": true,
"commandline": "\"%PROGRAMFILES%\\git\\bin\\bash.exe\" -i -l",
"icon": "%PROGRAMFILES%\\git\\mingw64\\share\\git\\git-for-windows.ico",
"name": "Git Bash",
"startingDirectory": "W:\\src"
}