Skip to content

Instantly share code, notes, and snippets.

@rfuzzo
rfuzzo / scopedStopwatch.cs
Last active November 22, 2021 21:30
Scoped Stopwatch
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace gpm.core.Util
{
/// <summary>
/// A scoped stopwatch that will log the elapsed time automatically when exiting scope.
/// Usage: using var ssw = new ScopedStopwatch();
/// </summary>
@rfuzzo
rfuzzo / MYCLRPROJECT.nuspec
Last active July 18, 2021 07:13
Native c++/cli nugets
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.5">
<tags>Native, native</tags>
</metadata>
<files>
<!-- Include everything in \build -->
<file src="build\**" target="build" />
@rfuzzo
rfuzzo / cp77_archive_ksy
Last active December 7, 2020 21:28
cp77 archive ksy
meta:
id: rdar
file-extension: archive
endian: le
seq:
- id: header
type: ar_header
types:
@rfuzzo
rfuzzo / witcher3_cr2w.ksy
Last active November 10, 2021 15:06
witcher 3 cr2w kaitai ksy
meta:
id: cr2w
endian: le
seq:
- id: header
type: cr2w_header
meta:
id: dds
file-extension: dds
endian: le
seq:
- id: magic
contents: [0x44, 0x44, 0x53, 0x20]
- id: dwsize
type: u4
meta:
id: fx11obj
file-extension: fx11obj
endian: le
seq:
- id: header
type: dxbc_header
- id: chunks
type: dxbc_chunk
meta:
id: cache
file-extension: .cache
endian: le
instances:
footer:
pos: _io.size - 48
size: 48
type: footer