Skip to content

Instantly share code, notes, and snippets.

View parzivail's full-sized avatar

Colby Newman parzivail

View GitHub Profile
@parzivail
parzivail / printers.csv
Created November 11, 2025 02:00
Mini BLE thermal printers and their parameters
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 47 columns, instead of 43 in line 3.
modelNo,A4XII,addMorPix,addMorePixNum,autoLabelCheck,backPaperNum,canChangeMTU,canPrintLabel,corePrint,d1key,deepenEnergy,detectionValue,devdpi,grayDeepenEnergy,grayImageSpeed,grayModerationEnergy,grayPrint,grayScale,grayThinEnergy,hasId,headName,imgMTU,imgPrintSpeed,interval,labelDevice,labelDeviceSize,labelValue,lzoVersion,model,moderationEnergy,newCompress,newFormat,oneLength,paperNum,paperSize,printSize,showElectricityModel,size,slowInterval,tattooEnergy,tattooPaper,tattooSpeed,textEnergy,textPrintSpeed,thinEnergy,useNewActivation,useSPP
XW001,False,True,-1,False,0,False,False,False,,0,0,200,0,40,0,False,1,0,False,PR20-,0,45,2,False,0,0,,0,0,False,False,8,2,384,384,0,2,0,0,False,0,0,35,0,False,False
XW002,False,True,-1,False,0,False,False,False,,0,0,300,0,40,0,False,1,0,False,PR30-,0,45,2,False,0,0,,0,0,True,False,12,2,576,576,0,2,0,0,False,0,0,35,0,False,False
XW003,False,True,-1,False,0,False,False,False,,0,0,200,0,40,0,False,1,0,False,PR25-,0,45,5,False,0,0,,1,0,True,False,8,2,384,384,0,2,0,0,False,0,0
@parzivail
parzivail / NvidiaInterop.cs
Created July 27, 2025 16:15
Creates a profile in the NVIDIA Control Panel that disables Threaded Optimization
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
namespace NvidiaInterop_cs;
internal static class NvidiaInterop
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
private unsafe struct NvAPI_UnicodeString
@parzivail
parzivail / rlImGui.cs
Created July 27, 2025 16:05
Hexa-based imgui 1.92.2 backend for Raylib with RendererHasTextures and RendererHasVtxOffset support
/*******************************************************************************************
*
* Based on: https://github.com/raylib-extras/rlImGui-cs (ZLib license)
*
********************************************************************************************/
using System.Numerics;
using System.Runtime.InteropServices;
using Hexa.NET.ImGui;
using Hexa.NET.ImNodes;
@parzivail
parzivail / Program.cs
Created August 1, 2024 23:34
Myst (Windows) WDIB to BMP
using System.Collections;
using System.Net;
namespace MystKit;
class Program
{
static void Main(string[] args)
{
foreach (var path in Directory.GetFiles(@"D:\myst\MYST_DAT", "*WDIB*.bin"))
@parzivail
parzivail / main.cpp
Created September 14, 2022 00:16
Teensy/Arduino-compatible project to drive a grayscale display from a Palm PDA
#include <Arduino.h>
/*
Test code to drive a display from a Palm PDA (grayscale display, not color)
Notes:
- The pixel clock is nominally 1.3 MHz on a PDA but has been tested up to around 100 MHz
- The line clock nominally is 13 kHz but has been tested up to around 125 kHz
- The frame clock nominally is around 90 Hz but has been tested up to around 700 Hz
Pinout:
@parzivail
parzivail / tcp802.h
Created September 13, 2022 01:31
Single-header Teensy/Arduino-compatible library for controlling a TCP802-based CNKD0401-14004Ax display
#include <Arduino.h>
#ifndef __TCP802_H_
#define __TCP802_H_
// These modules are found in various CyberPower UPS systems. VDD, LED, and backlight are at least 5v tolerant.
// Module: https://www.globalsources.com/Alphanumeric-LCD/Alphanumeric-LCD-Module-1172373840p.htm
// Controller IC datasheet: https://pan.baidu.com/link/zhihu/7dhjzRuShLiGV2IUFmUrNfZUSDaOVkcwZn92==
/*
@parzivail
parzivail / github-markdown-vscode.css
Last active September 12, 2019 12:00
vscode mdmath stylesheets
/* Generated from 'node_modules/github-markdown-css/github-markdown.css' */
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s0
Named Binary Tag specification
NBT (Named Binary Tag) is a tag based binary format designed to carry large amounts of binary data with smaller amounts of additional data.
An NBT file consists of a single GZIPped Named Tag of type TAG_Compound.
A Named Tag has the following format:
byte tagType
TAG_String name
[payload]
@parzivail
parzivail / keymap.c
Last active September 28, 2018 20:23
Prime_M QMK keymap
/* Copyright 2018 Jumail Mundekkat
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@parzivail
parzivail / .hyper.css
Last active August 10, 2017 00:53
Hyper settings
/* #window */
/* #terminal */
* {
font-variant-ligatures: contextual;
}
.cursor-node[focus="true"] {
mix-blend-mode: difference;
animation: blink 2s infinite ease-in-out;