Skip to content

Instantly share code, notes, and snippets.

View DamianSuess's full-sized avatar
🙃
BeepBoop(); Execute();

Damian DamianSuess

🙃
BeepBoop(); Execute();
View GitHub Profile
@DamianSuess
DamianSuess / flame.py
Created August 16, 2026 15:03
Console Flame Example
#!/usr/bin/python
# Sample console fame animation
# Based on with fixes: https://gist.github.com/msimpson/1096950
import curses, random
screen = curses.initscr()
width = screen.getmaxyx()[1]
height = screen.getmaxyx()[0]
size = width*height
@DamianSuess
DamianSuess / STM32-TAMP-Register-README.md
Last active July 2, 2026 12:42
STM32 TAMP Register for Tamper And Backup Registers - a hardware security and data-retention block

STM32 (STM32H5) TAMP Register

The STM32H5 TAMP (Tamper and Backup Registers) peripheral is a hardware security and data-retention block. It is designed to detect physical or electronic intrusions and automatically erase sensitive device secrets to prevent attacks, while also managing backup registers that survive power loss.

Key TAMP Features

  • Tamper Detection: Supports multiple internal and external tamper sources (like active/passive detection) to catch intrusions.
  • Backup Registers: 32 32-bit registers (TAMP_BKP0R to TAMP_BKP31R) designed to retain critical data when the main $V_{DD}$ supply is off.
  • Boot Hardware Keys: The first 8 backup registers (TAMP_BKP0R – TAMP_BKP7R) can store secure AES boot hardware keys.
  • Secrets Erasure: Capable of triggering immediate hardware erasure of device secrets, backup SRAM, and backup registers.
@DamianSuess
DamianSuess / SMBDIS.ASM
Created April 20, 2026 01:52 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
---
# References:
# - https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# - Terminal - https://github.com/microsoft/terminal/blob/main/.clang-format
BasedOnStyle: Microsoft
AlignConsecutiveMacros: true
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
@DamianSuess
DamianSuess / VS-Code-Better-Defaults.md
Last active May 28, 2026 16:58
Win11 - Removing Overhead Original Context Menu and More

VS Code Clean Configurations

By VS Code has some poor default configurations, lets undo some of those sins.

  • Access Settings to begin: Ctrl + ,

Don't Restore Windows on Next Launch

Always start VS Code with a fresh slate. Don't restore previously opened tabs or projects.

@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