Skip to content

Instantly share code, notes, and snippets.

View DamianSuess's full-sized avatar
👍
Enjoying every day

Damian DamianSuess

👍
Enjoying every day
View GitHub Profile
@DamianSuess
DamianSuess / README.md
Last active November 10, 2025 19:12
Win11 - Removing Overhead Original Context Menu and More

Removing Win 11 Overhead Garbage

Disable Search Suggestions from the Web

  1. Open Registry Editor as admin
  2. Navigate to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows.
  3. Right-click on the Windows key, select New, then Key, and name it Explorer.
  4. Click on the new Explorer key. Right-click in the right pane, select New, then DWORD (32-bit) Value, and name it DisableSearchBoxSuggestions.
  5. Double-click DisableSearchBoxSuggestions and set the Value data to 1.
  6. Click OK, close the Registry Editor
@DamianSuess
DamianSuess / Constants.cs
Last active October 23, 2025 18:25
Cross-Platform INI File
namespace TestApp.Models.Settings;
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:File name should match first type name", Justification = "This is small utility.")]
public static class Key
{
public const string AutoStartApp = "AutoStartApp";
public const string Ping1Enabled = "ping1-enabled";
public const string Ping1Host = "ping1-host";
}
@DamianSuess
DamianSuess / EnumDescriptionConverter.cs
Last active October 17, 2025 14:26
Avalonia EnumDescriptionConverter Sample - Display Enums in ComboBox
using System;
using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using Avalonia.Data.Converters;
namespace Diagnostics.Converters;
public class EnumDescriptionConverter : IValueConverter
{

Alternative Approach

As an alternative approach, you can create your own custom LogService and wire-in class lookups etc.

The following snippet was created for a Prism.Avalonia application using NLog v5. It is long and adds overhead that must be maintained.

Program.cs

using Avalonia;
@DamianSuess
DamianSuess / IniFile.cs
Last active August 19, 2025 18:34
Custom INI File Class - light-weight and simple
// The following was tested using RolsynPad 20.0
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
// Example usage
var ini = new IniFile();
ini.Load("config.ini");

Tools for Debugging and ReverseE

.NET

  • dnSpyEx - Unofficial revival of the well known .NET debugger and assembly editor, dnSpy
  • CodemerxDecompile - .NET multi-platform decompiler (original makers of JustDecompile)
  • de4dot - .NET deobfuscator and unpacker. (archived 2020)
  • ILSpy - .NET Decompiler with support for PDB generation, ReadyToRun, Metadata - cross-platform!
  • Iced - Blazing fast and correct x86/x64 disassembler, assembler, decoder, encoder for Rust, .NET, Java, Python, Lua
@DamianSuess
DamianSuess / BuildNumberIncrementor.md
Created March 17, 2025 16:05
Build Number Incrementor

Build Incrementor

Build Command

dotnet build MyProject.csproj --configuration Release /p:Version=%1

References

@DamianSuess
DamianSuess / ImageCache.cs
Created January 18, 2025 19:28
ImageCache for .NET MAUI
using Microsoft.Maui.Storage;
using System.Security.Cryptography;
using System.Text;
// Based on: https://github.com/soyfrien/ImageCache
namespace MyProjectNamespace;
/// <summary>
/// Use this class to cache images from the Internet.
/// Its functions receive a URI and turn the resource into an ImageSource, byte array, Stream, or Func‹Stream›.
@DamianSuess
DamianSuess / Avalonia-MultiBinding.axaml
Created August 28, 2024 20:02
Avalonia-MultiBinding
<UserControl.Resources>
<ResourceDictionary>
<DataTemplate x:Key="FlatDeviceInfo" DataType="models:DeviceInfo">
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} - {1}">
<Binding Path="Address" />
<Binding Path="DeviceTypeName" />
</MultiBinding>
</TextBlock.Text>
@DamianSuess
DamianSuess / Laravel-ApiAndWebController.php
Created June 15, 2024 14:12
Laravel 11 - API and Web Sharing Controller
/*
* Example showing how to share an API route with a Web (view)
* If the request expects JSON, it shall receive it. Otherwise, display the View.
* Remember, just because you can, doesn't mean you should.
*/
class ActivityController extends Controller
{
/**
* Display a listing of the resource.
*/