Skip to content

Instantly share code, notes, and snippets.

View Pixelsuft's full-sized avatar
:octocat:

pixelsuft‮ Pixelsuft

:octocat:
View GitHub Profile
@joanbm
joanbm / nvidia-470xx-fix-linux-6.15.patch
Last active June 1, 2025 23:56
Tentative fix for NVIDIA 470.256.02 driver for Linux 6.15-rc1
From c9a877ea48935bb40597cc2e7d88b0035a27e6f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <[email protected]>
Date: Sat, 12 Apr 2025 22:46:59 +0000
Subject: [PATCH] Tentative fix for NVIDIA 470.256.02 driver for Linux 6.15-rc1
The trickier part of this patch is that vm_flags_set and vm_flags_clear
depend on a GPL-only symbol (__vma_start_write) since Linux >=6.15.
In some situations (mainly nvidia_mmap_helper), we can replace it by
vm_flags_reset as the VMA gets locked by other previous calls.
@joanbm
joanbm / nvidia-470xx-fix-linux-6.14.patch
Created February 3, 2025 00:16
Tentative fix for NVIDIA 470.256.02 driver for Linux 6.14-rc1
From bee3ff1153f7b42491d2a0552d6f9a66a307ec1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <[email protected]>
Date: Sun, 15 Dec 2024 17:56:03 +0000
Subject: [PATCH] Tentative fix for NVIDIA 470.256.02 driver for Linux 6.14-rc1
---
nvidia-drm/nvidia-drm-drv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
@joanbm
joanbm / nvidia-470xx-fix-linux-6.13.patch
Last active May 30, 2025 11:57
Tentative fix for NVIDIA 470.256.02 driver for Linux 6.13-rc1
From 9f91b171f680648647580c163bbc9cc1641e3920 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <[email protected]>
Date: Sat, 16 Nov 2024 22:45:21 +0000
Subject: [PATCH] Tentative fix for NVIDIA 470.256.02 driver for Linux 6.13-rc1
---
nvidia-modeset/nvidia-modeset.Kbuild | 8 +++++---
nvidia/nvidia.Kbuild | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
@joanbm
joanbm / nvidia-470xx-fix-linux-6.12.patch
Last active March 4, 2025 20:24
Tentative fix for NVIDIA 470.256.02 driver for Linux 6.12-rc1
From 839b964bd5be20275a4d1add020e68e407380adb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <[email protected]>
Date: Sat, 17 Aug 2024 14:26:04 +0000
Subject: [PATCH] Tentative fix for NVIDIA 470.256.02 driver for Linux 6.12-rc1
Note that the fix requires enabling DRM kernel mode setting
(add the `nvidia-drm.modeset=1` parameter to the kernel command line).
(Thanks xtexChooser for the memory management fixes!)
---
@Pixelsuft
Pixelsuft / nodejs_text_screen.js
Last active August 3, 2022 12:36
v86 nodejs text screen example
#!/usr/bin/env node
"use strict";
var fs = require("fs");
var V86Starter = require("../build/libv86.js").V86Starter;
function readfile(path)
{
return new Uint8Array(fs.readFileSync(path)).buffer;
}
@rounk-ctrl
rounk-ctrl / Dark.md
Last active June 13, 2025 18:26
Win32 Dark Mode

Dark Mode APIs.

API Signatures.

ShouldAppsUseDarkMode()

Checks whether system is using dark mode or not.
Signature:

using fnShouldAppsUseDarkMode = bool (WINAPI*)(); // ordinal 132

AllowDarkModeForWindow(In HWND hWnd, In bool allow)

@StanislavPetrovV
StanislavPetrovV / voxel_starfield.py
Last active January 20, 2024 15:24
VoxelStarfield
import pygame as pg
import random
import math
vec2, vec3 = pg.math.Vector2, pg.math.Vector3
RES = WIDTH, HEIGHT = 1600, 900
NUM_STARS = 1500
CENTER = vec2(WIDTH // 2, HEIGHT // 2)
COLORS = 'red green blue orange purple cyan'.split()
@Pixelsuft
Pixelsuft / backward_midi.py
Created October 12, 2021 10:29
MIDI Backward
from mido import MidiFile
fn = input('Enter file name: ').replace('"', '')
ext = fn.split('.')[-1].strip()
no_ext = '.'.join(fn.split('.')[:-1])
cv1 = MidiFile(fn, clip=True)
@Pixelsuft
Pixelsuft / pip_hooker.py
Last active September 29, 2021 09:28
Running pip without creating process
'''
MIT License
Copyright (c) 2021 Pixelsuft
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
@Pixelsuft
Pixelsuft / unsplitter.py
Created September 27, 2021 09:04
Unity assents unsplitter
'''
MIT License
Copyright (c) 2021 Pixelsuft
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