This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: | |
https://gist.github.com/jstarcher/abdac9c2c0b5de8b073d527870b73a19 | |
https://bbs.archlinux.org/viewtopic.php?pid=2044189#p2044189 | |
/etc/modprobe.d/nvidia.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem | |
# python3 server.py | |
import http.server | |
import ssl | |
def get_ssl_context(certfile, keyfile): | |
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
# text_edit.py | |
# Python text editor (from random Tinker based code) with pass encryption, with UTF-8 text support(non ASCII) | |
# usage: | |
# pip3 install pycryptodome | |
# python3 text_edit.py | |
# P.S. password strength: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// depth fog is something like this | |
shader_type spatial; | |
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx,unshaded; | |
uniform sampler2D depth_tex:hint_depth_texture; | |
void vertex() { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# DO NOT USE | |
# WARNING - THIS IS JUNK, MADE FOR ONE USE MAY NOT WORK. | |
# Expected to work only with 3-length 1024 tokens range. | |
# WARNING shadertoy PRIVATE API_key | |
# https://www.shadertoy.com/view/cdXyWr | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
just notes to not lose: | |
https://gitlab.freedesktop.org/drm/amd/-/issues | |
https://gitlab.freedesktop.org/mesa/mesa/-/issues/?label_name%5B%5D=RADV | |
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12213 | |
amd ring timeout | |
sudo journalctl -b -1 -o cat --no-pager | grep "amdgpu: ring gfx" | |
disable GPU recovery by adding amdgpu.gpu_recovery=0 to your kernel boot options (you can verify it's correctly set after a reboot using dmesg) | |
when the GPU hang happens, invoke 'umr -RS gfx_0.0.0 &> umr_rings.log' (needs to install umr first) and attach umr_rings.log to this ticket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this example of generating Shadertoy audio texture and use of mmsystem.h | |
// https://docs.microsoft.com/en-us/windows/win32/api/mmsystem/ | |
// code made by ttg https://github.com/therontarigo | |
// It compiles in mingw and runs in WINE | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> | |
#include <mmsystem.h> | |
#include <GL/gl.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os | |
import sys | |
# this script to convert floats in GLSL code to "less variative constants" | |
# set b_scale = <VALUE> example 64.0 | |
# floats in range 0-1 will be rescaled with float step 1/64 or 1/(b_scale step) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc shadertoy_audio_to_wav.c -lm | |
// ./a.out | |
// detailed info about shadertoy audio texture | |
// https://gist.github.com/soulthreads/2efe50da4be1fb5f7ab60ff14ca434b8 | |
#include <stdio.h> | |
#include <stdarg.h> | |
#include <stdlib.h> |