Skip to content

Instantly share code, notes, and snippets.

View BinToss's full-sized avatar
✍️
Making progress...

Noah Sherwin BinToss

✍️
Making progress...
View GitHub Profile
@BinToss
BinToss / assignAttributeGroupIDs.mts
Last active February 5, 2024 06:43
redhat.vscode-xml - assignAttributeGroupIDs
// https://github.com/redhat-developer/vscode-xml/issues/965
import micromatch from 'micromatch';
// example of a PatternGroup[] parsed from the VSCode workspace's configuration (./.vscode/settings.json)
const workspaceConfigurationPatternGroups: PatternGroup[] = [
[
// same matches as "(mc|d):*", but implemented as two calls to micromatch.match and a call to array.push() to combine the matches
"mc:*",
"d:*"
],
@BinToss
BinToss / Avalonia Client.log
Last active January 20, 2024 00:58
2023-01-19 AvaloniaVsCode Daignostics
2024-01-19 16:44:25.869 [info] Creating language service
2024-01-19 16:44:25.869 [info] Starting Avalonia Language Server...
2024-01-19 16:44:25.947 [info] [Trace - 4:44:25 PM] Sending request 'initialize - (0)'.
2024-01-19 16:44:27.595 [info] [Trace - 4:44:27 PM] Received response 'initialize - (0)' in 1648ms.
2024-01-19 16:44:27.595 [info] [Trace - 4:44:27 PM] Sending notification 'initialized'.
2024-01-19 16:44:27.596 [info] [Trace - 4:44:27 PM] Sending notification 'workspace/didChangeConfiguration'.
2024-01-19 16:44:27.678 [info] [Trace - 4:44:27 PM] Received request 'client/registerCapability - (1)'.
2024-01-19 16:44:27.678 [info] [Trace - 4:44:27 PM] Sending response 'client/registerCapability - (1)'. Processing request took 1ms
2024-01-19 16:44:27.685 [info] [Trace - 4:44:27 PM] Received request 'workspace/configuration - (2)'.
2024-01-19 16:44:27.685 [info] [Trace - 4:44:27 PM] Sending response 'workspace/configuration - (2)'. Processing request took 0ms
@BinToss
BinToss / BetterInventory.patch
Created October 20, 2023 06:52
BetterInventory.patch for Fallout 76 Update October 10, 2023 (2023-10-10)
diff --git a/Pipboy_InvPage.class.asasm b/Pipboy_InvPage.class.asasm
index 010f670..28be0a7 100644
--- a/Pipboy_InvPage.class.asasm
+++ b/Pipboy_InvPage.class.asasm
@@ -279,20 +279,46 @@ class
getlex QName(PackageNamespace("Shared.AS3.COMPANIONAPP"), "CompanionAppMode")
getproperty QName(PackageNamespace(""), "isOn")
iffalse L238
getlocal0
@BinToss
BinToss / Better Inventory Auto-Patcher 1.4.0.log
Created October 20, 2023 03:26
Better Inventory Auto-Patcher 1.4.0 - CLI output for Fallout 76 v1.81's pipboy_invpage.swf
---- BetterInventory Auto-Patcher Information ----
The auto-patcher automatically injects the BetterInventory loader into
pipboy_invpage.swf.
INSTRUCTIONS:
- Place the pipboy_invpage.swf to be patched in the current directory.
- The patched file will be created and named pipboy_invpage_patched.swf.
- The original file will be left unchanged.
@BinToss
BinToss / C# - Use Aggregate<FlagEnum>(func()) to combine flags.dib
Last active May 12, 2023 04:43
C# - Can I use IEnumerable<T>.Aggregate<T>(func()) to combine flag enum values?
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"name":"csharp"}]}}
#!csharp
/** Q: Can I use IEnumerable<T>.Aggregate<T>(func()) to combine flag enum values?
A:
*/
using System.Collections.Concurrent;
@BinToss
BinToss / C# - Equivalents to C and C++ Unions and Bitfields.dib
Last active May 11, 2023 07:46
C# - Equivalents to C and C++ Unions and Bitfields
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"name":"csharp"}]}}
#!csharp
/** Q: How do I make C# equivalents to C/C++ unions and bitfields?
A: Short answer: it's possible, but can be difficult to read. */
/** references:
* Unionize Your Variables - An Introduction To Advanced Data Types In C | Hackaday
@BinToss
BinToss / c# - Add Items to Readonly List.dib
Created May 11, 2023 07:45
C# - Can I add items to a readonly list?
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"name":"csharp"}]}}
#!csharp
// You can Add items to readonly lists!
List<uint> luint {get;} = new(){10u};
luint.Add(67u);
@BinToss
BinToss / C# - Lazy initialization of properties' fields.dib
Created May 11, 2023 04:48
C# - Using nullable values, can a property's backing field initialize only when needed?
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"name":"csharp"}]}}
#!csharp
/** Q: C# - Using nullable values, can a property's backing field initialize only when needed?
A: If null or default initialization is acceptable, yes. Until get_Property is called, the field's value will remain default. (null, null) in this example.
*/
using System.ComponentModel;
@BinToss
BinToss / IsWow64Process2_processIsNative.dib
Last active May 11, 2023 04:40
Using IsWow64Process2, how do we determine if a process is running natively?
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"name":"csharp"}]}}
#!csharp
/** Q: Using IsWow64Process2, how do we determine if a process is running natively?
A: pProcessMachine will be assigned the UNKNOWN enum value.
*/
@BinToss
BinToss / C# - flags.ToString().dib
Last active May 11, 2023 04:33
C# - How is a combination of flag values converted to string?
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"name":"csharp"}]}}
#!csharp
/** Q: How is a combination of flag values converted to string?
A: 3 is "one, two"
*/
[Flags]