Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan A. Pavlik rpavlik

View GitHub Profile
@rpavlik
rpavlik / install-fonts.ps1
Created Jul 22, 2022
sample powershell script to install fonts
View install-fonts.ps1
# 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 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 Aug 17, 2022
basic system setup
View setup.ps1
# install scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
# for bare metal
iwr -useb get.scoop.sh | iex
# or, for VM with a shared w:\ drive already
$env:SCOOP = 'w:\scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
iwr get.scoop.sh -outfile 'install.ps1'
@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