Skip to content

Instantly share code, notes, and snippets.

@Tekunogosu
Tekunogosu / starfieldcustom.ini
Last active February 13, 2024 13:59
starfieldcustom.ini
[Display]
fDefault1stPersonFOV=90
fDefaultFOV=90
fDefaultWorldFOV=90
fFPWorldFOV=90
fTPWorldFOV=90
;bEnableRaytracing=1
;bUseSkyLighting=1
;set to 0 to disable
fMaxAnisotropy=2
@Tekunogosu
Tekunogosu / gist:b5a21e8bc3395bdc81c4b0ec1a00362a
Created September 2, 2023 05:29
vim regex for gentoo kernel modules
#/lib/modules/6.5.0-gentoo-nox/kernel/virt/lib/irqbypass.ko
:%s/.*\/\([^/]\+\)\.k\{,1\}o\?$/\1/
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QLineEdit, QLabel
from PyQt5.QtGui import QCursor, QKeyEvent
from PyQt5.QtCore import Qt, QEvent
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
## Make sure the kernel in use has a real time patch available for it.
## Check the below patch site for a patch for the appropriate kernel
## For gentoo, its usually necessary to emerge a specific version of the kernel as not all version have a patch set
## Using different kernel than the one you're using also allows you to switch between a working version if something goes wrong
## You need to make sure the exact version matches, example: 5.15.65 is exact version I used
## Patch site
## https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.15.59-gentoo Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 11.3.0 p4) 11.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23800
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.15.65-gentoo Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 11.3.0 p4) 11.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23800
@Tekunogosu
Tekunogosu / nvidia-driver-realtime.sh
Created September 15, 2022 00:25 — forked from pantor/nvidia-driver-realtime.sh
Installing NVIDIA drivers on a realtime Linux (PREEMPT-RT)
# Tested on Ubuntu 16.04 and X11, 2019
# 1. Download NVIDIA driver as a .run file
# 2. Stop X-Server
sudo service lightdm stop
# 3. Blacklist Nouveau driver
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /var/db/repos/gentoo
sync-type = git
#sync-uri = https://anongit.gentoo.org/git/repo/sync/gentoo.git
sync-uri = https://github.com/gentoo-mirror/gentoo.git
clone-depth = 1
sync-depth = 1
@Tekunogosu
Tekunogosu / AdjustBrightness.py
Created January 4, 2022 17:39
Adjustable brightness script using Xrandr. This may only work for displays that have adjustable brightness levels such as laptops.
#!/usr/bin/env python3
import subprocess, shlex, re, logging, os, sys
# TODO: implement logging
# TODO: implement setting brightness based on specific values as well
home_dir = os.path.expanduser("~")
VAL_STEP = 0.05
UPPER_BOUNDS = 0.90