Skip to content

Instantly share code, notes, and snippets.

View infirms's full-sized avatar

noice infirms

  • 12:35 (UTC +09:00)
View GitHub Profile
@mikaeldui
mikaeldui / CachyOS Kernel for Fedora with Secure Boot.md
Last active December 29, 2025 04:19
CachyOS Kernel for Fedora with Secure Boot

image

CachyOS Kernel for Fedora with Secure Boot

Did you just install kernel-cachyos and got hit by bad shim signature when booting? Me too. This is how I fixed it.

First, make sure you have Secure Boot with mokutil --sb-state.

Note, there's a second way of doing this by using sbctl, but I didn't want to wipe my Secure Boot keys.

Need help? Feel free to leave a comment below, contact me (@mikaeldui) on the CachyOS Discord, or send me an email.

@infirms
infirms / clang_crosscompile.txt
Last active August 23, 2023 10:43
My own way how to crosscompile clang64 to be able produce both x64 and x86 binraries
Install both x86 and x64 clang compilers.(clang64 and clang32)
Get the actual path of your x86 clang.
Add this to your clang64 compiler flags editing the path if needed:
-resource-dir c:/tools/msys64/clang32/lib/clang/16
--sysroot=c:/tools/msys64/clang32
-m32
--target=i686-w64-windows-gnu
@Reijaff
Reijaff / stack_string.zig
Created January 20, 2023 21:22
convert string to stack string at compile time in zig
const std = @import("std");
fn stack_string(comptime string: []const u8) [string.len]u8{
var new_string: [string.len]u8 = undefined;
inline for (string) |chr, idx|{
new_string[idx] = chr;
}
return new_string;
@jdmichaud
jdmichaud / 1-zig-cheatsheet
Last active November 30, 2025 10:35
Zig cheatsheet
https://ziglang.org/documentation/master/#Pointers
Local std lib docs:
```bash
$ zig std
```
Browse the std lib code
```bash
$ vi $(zig env | jq -r .std_dir)
@mmozeiko
mmozeiko / !README.md
Last active December 30, 2025 21:21
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK from newest Visual Studio.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@SolomonSklash
SolomonSklash / create-msvcrt
Created September 25, 2020 23:57
Creating msvcrt.lib
# On Windows, within a VS developer prompt
# Dump the exports of msvcrt.dll
dumpbin.exe /exports C:\Windows\System32\msvcrt.dll > msvcrt.txt
# Copy msvcrt.txt to a Linux box
# Convert the file to Unix line endings
dos2unix msvcrt.txt
@fatalbit
fatalbit / theme.css
Last active May 6, 2025 14:05
IDA Monokai Color Palette
/* INSTALL:
*
* Put this file under the respective directory.
* Windows: %APPDATA%\Hex-Rays\IDA Pro\themes\monokai\theme.css
* Linux & MacOS: ~/.idapro/themes/monokai/theme.css
*
* In Options -> Colors change theme to monokai
*
* */
@importtheme "dark";
@KN4CK3R
KN4CK3R / CSGOFont.cpp
Last active June 30, 2025 23:34
OSHGui::Drawing::Renderer implementation with Source Engine
#include "CSGOFont.hpp"
using namespace OSHGui;
using namespace OSHGui::Drawing;
//---------------------------------------------------------------------------
//Constructor Test
//---------------------------------------------------------------------------
CSGOFont::CSGOFont(Classes::IMatSystemSurface *surface_, const Misc::AnsiString &name, int size)
: surface(surface_),
void InstrumentationCallback(CONTEXT *context)
{
TEB *teb = NtCurrentTeb();
context->Rip = teb->InstrumentationCallbackPreviousPc;
context->Rsp = teb->InstrumentationCallbackPreviousSp;
context->Rcx = context->R10;
// Prevent recursion
if (!teb->InstrumentationCallbackDisabled) {
@hanksudo
hanksudo / enable-ant-aliasing-vscode.md
Last active August 7, 2025 23:01
Enable font anti-aliasing on VS Code
vim /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.css

add to .editor-container section

-webkit-font-smoothing: antialiased;