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 / ExecNupkgDeterministicator.target.xml
Last active August 26, 2024 02:24
An MSBuild Target wrapping Kuinox.NupkgDeterministicator to automate deterministic packing
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- ExecNupkgDeterministicator
<Summary>
| Inputs | Values/Types | Default | Usage |
| - - - - - - - - - - - | - - - - - - - - - - - - - - | - - - - - - - - - - - - - - | - - - - - - |
| Deterministic | `'true'`/`'false'`/`''` | `'true'` | If true, run NupkgDeterministicator on the nupkg and snupkg (if applicable) |
| PackageOutputPath | string | `'$(OutputPath)'` | The directory in which the package was created |
| PackageId | string | `'$(AssemblyName)'` | Used to identify the nupkg and symbols package |
| PackageVersion | string | `'$(Version)'` | Used to identify the nupkg and symbols package |
| IncludeSymbols | `'true'`/`'false'`/`''` | `''` (falsey) | If true, deterministicate the s
@BinToss
BinToss / FlatCompat.config#flatArray[16].js
Last active May 30, 2024 04:44
Debugging ESLint FlatCompat pushing a function to a string[]
// derived from https://github.com/moonrepo/dev/blob/f3c51298bf732182108ee8790371be0a4e376ff6/packages/eslint-config/src/module.ts#L131-L137
{
rules: {
"import/no-default-export": "off",
},
// files must be a string[]. Functions will cause minimatch to throw a TypeError.
files: [
absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath),
],
}
@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# - 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# - 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# - 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;