Skip to content

Instantly share code, notes, and snippets.

View namazso's full-sized avatar
😂
👌

namazso

😂
👌
View GitHub Profile
@namazso
namazso / CMakeLists.txt
Created March 26, 2024 10:22
Universal function proxy
cmake_minimum_required(VERSION 3.28)
project(untitled C ASM)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
@namazso
namazso / config.json
Created February 21, 2024 01:52
Syanpse matrix.org media piggyback for Caddy
{
"match": [
{
"host": [
"matrix.yourdomain.com"
],
"path": [
"/_matrix/media/*/download/*/*",
"/_matrix/media/*/download/*/*/*",
"/_matrix/media/*/thumbnail/*/*"
@namazso
namazso / wg-nm-firewalld.md
Last active December 24, 2023 17:02
Wireguard VPN with NetworkManager and firewalld

WireGuard VPN setup with NetworkManager and firewalld

Prerequisites

This guide uses NetworkManager and firewalld. Both of these are installed and used by default on current versions of Red Hat Enterprise Linux and Fedora.

First, test that NetworkManager is in use:

# nmcli
@namazso
namazso / ThemeManagerDemo.cs
Last active October 8, 2023 05:51
Setting themes with IThemeManager2 in C#
// Copyright (c) 2022 namazso <admin@namazso.eu>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
@namazso
namazso / settings.json
Created February 22, 2022 09:20
MSYS2 in Windows terminal
{
"commandline": "cmd /c \"set MSYSTEM=MINGW32 && set LOGINSHELL=bash && C:\\msys64\\usr\\bin\\bash.exe --login\"",
"name": "MSYS2 MinGW 32-bit",
"icon": "C:\\msys64\\mingw32.ico"
},
{
"commandline": "cmd /c \"set MSYSTEM=MINGW64 && set LOGINSHELL=bash && C:\\msys64\\usr\\bin\\bash.exe --login\"",
"name": "MSYS2 MinGW 64-bit",
"icon": "C:\\msys64\\mingw64.ico"
},
@namazso
namazso / coff.ksy
Created January 13, 2022 20:41
Kaitai Struct YAML for COFF
meta:
id: coff
title: Common Object Format File
file-extension:
- obj
license: CC0-1.0
ks-version: 0.9
endian: le
doc-ref: https://wiki.osdev.org/COFF
seq:
@namazso
namazso / flags.asm
Created December 15, 2021 07:25
get/set RFLAGS with perfect unwinding
.code
getflags PROC FRAME
pushfq
.pushreg rax
.endprolog
.beginepilog
pop rax
ret
getflags ENDP
@namazso
namazso / irc_format.cpp
Created October 15, 2021 03:29
IRC formatting parser
#include <string>
#include "irc_format.h"
struct IRCParser
{
enum State : int
{
Normal,
Color1_1,
Color1_2,
@namazso
namazso / hwinfosharedmem.h
Last active October 27, 2023 07:41
Reverse engineered HWiNFO shared memory format
#pragma once
// HWiNFOSharedMem - Reverse engineered HWiNFO shared memory format
// Copyright (C) 2020 namazso
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,

Keybase proof

I hereby claim:

  • I am namazso on github.
  • I am namazso (https://keybase.io/namazso) on keybase.
  • I have a public key ASAB6RagHlmZBRr9h2lYD9mgZWpfuNbycSbRksuCeQ1SaQo

To claim this, I am signing this object: