Skip to content

Instantly share code, notes, and snippets.

View henrygab's full-sized avatar

Henry Gabryjelski henrygab

View GitHub Profile
@henrygab
henrygab / ANSI.md
Created September 20, 2024 00:43 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@henrygab
henrygab / More Useful Memory Dumps
Last active January 9, 2023 04:30
Thoughts on Driver Verifier -- ERRORS LIKELY -- Proceed at own risk
# Getting more data in the memory dumps
By default, when the machine bugchecks / bluescreens, very little
information is written to the dump file. This is how to change
that.
## WARNING -- Bitlocker -- WARNING
If you have bitlocker enabled, because this changes startup
@henrygab
henrygab / 0-CPU WS2812 on nRF52840.md
Last active August 31, 2021 07:44
Realtime hardware (zero-CPU) generation of ws2812 signals on nrf52840

Thought experiment ... untested

Don't bother trying this. It's much simpler nowadays to grab a RPi2040, and use the PIO state machines to drive the output instead. Or just grab an ESP32-based board, load WLED on it, and get WiFi connected effects that you can control via it's built-in web server.

Background

A while back, I was implementing support for the nRF52840 chipset in FastLED.

@henrygab
henrygab / test.cpp
Created April 28, 2020 22:47
Brute-force validation of UTF-8 decoder
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 Henry Gabryjelski
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@henrygab
henrygab / example.cs
Created March 29, 2019 06:14
Commented .editorconfig example source file
internal class Program
{
#region // CONST exception to .NET Guidelines prohibiting non-private fields (PascalCase)
public const int FooBar1 = 1; // Good (no warning) - Valid
internal const int FooBar2 = 1; // Good (no warning) - .NET guidelines silent, added via rule set C/D
protected internal const int FooBar3 = 1; // Good (no warning) - .NET guidelines silent, added via rule set C/D
protected const int FooBar4 = 1; // Good (no warning) - Valid
private protected const int FooBar5 = 1; // Good (no warning) - .NET guidelines silent, added via rule set C/D
private const int FooBar6 = 1; // Good (no warning) - .NET guidelines silent, added via rule set C/D
@echo off
setlocal enableExtensions enableDelayedExpansion
REM -
REM - Copyright Henry Gabryjelski
REM -
REM - Author:
REM - Henry Gabryjelski
REM - Work Title:
REM - Elevation Status Command Script
REM - License: