Skip to content

Instantly share code, notes, and snippets.

View infirms's full-sized avatar

noice infirms

  • 13:12 (UTC +03:00)
View GitHub Profile
@mikaeldui
mikaeldui / CachyOS Kernel for Fedora with Secure Boot.md
Last active June 15, 2025 16:49
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.

Installing the CachyOS Kernel

@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 May 1, 2025 07:48
Zig cheatsheet
https://ziglang.org/documentation/master/#Pointers
*T - single-item pointer to exactly one item.
Supports deref syntax: ptr.*
[*]T - pointer to unknown number of items. (eq. of *T in C)
Supports index syntax: ptr[i]
Supports slice syntax: ptr[start..end]
Supports pointer arithmetic: ptr + x, ptr - x
@mmozeiko
mmozeiko / !README.md
Last active June 17, 2025 20:03
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 - currently v14.40.33807 and v10.0.26100.0.

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";
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 September 25, 2024 14:11
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;