Skip to content

Instantly share code, notes, and snippets.

View makidoll's full-sized avatar

Maki makidoll

View GitHub Profile
@makidoll
makidoll / linux-xanmod-on-server.md
Last active February 8, 2024 15:41
Linux XanMod on Debian/Ubuntu Server

Linux XanMod on Debian/Ubuntu Server

Note

I've been experimenting with linux-tkg-bmq and https://liquorix.net/ and have found results to potentially be better so far.

Preface

I came across XanMod when I was trying to find a Linux fork that included the "PCIe ACS Override" patch for my personal Linux machine, specifically to passthrough a second GPU on my work related Windows VM. At the time, I also had microstuttering issues when playing Overwatch with Proton and it really sucked since I easily get motion sick. It was hard to play my favorite hero (Echo ^^) whilst also being on Linux. After installing XanMod, those microstuttering issues went away and it blew my mind. I've been able to have so much fun again.

@makidoll
makidoll / virtual-cable.sh
Created October 8, 2023 22:48
Make virtual cables with PulseAudio which works on PipeWire
#!/bin/bash
case $1 in
list)
pactl list short modules | grep " (Virtual Cable)"
;;
add)
if [ -z ${2} ];
then
@makidoll
makidoll / upscale-video.js
Last active July 19, 2023 11:53
Upscale anime videos with Real CUGAN
// download https://github.com/nihui/realcugan-ncnn-vulkan
// place this script in the same directory
// run `zx upscale-video.js`
const inputVideo = "palutenas-revolting-dinner-1.mp4";
const outputVideo = "palutenas-revolting-dinner-1-x4.mp4";
const scale = 4; // upscale ratio (1/2/3/4, default=2)
const noiseLevel = -1; // denoise level (-1/0/1/2/3, default=-1)
// note: upscaling palutena's revolting dinner 240p x4 with denoising will
@makidoll
makidoll / maki-qmk.json
Last active February 25, 2024 06:21
Maki's CannonKeys Bakeneko60 keymap, inspired by POK3R (https://config.qmk.fm)
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "cannonkeys/db60/hotswap",
"keymap": "maki",
"layout": "LAYOUT_60_ansi",
"layers": [
[
"KC_ESC",
@makidoll
makidoll / google-tcp-brr.md
Last active November 25, 2023 15:39
Increase server bandwidth with Google's TCP BRR

Increase server bandwidth using Google's TCP BRR

I'd recommend looking at my gist for Linux XanMod instead.
It includes BRR by default and more network optimizations.


Disclaimer: there's BRR2 or something but I haven't looked into it yet

TCP BRR (Bottleneck Bandwidth and RTT) is a congestion control algorithm.

Linux servers will use Reno and CUBIC algorithms by default which suck.

@makidoll
makidoll / convert-glsl-to-hlsl.md
Last active August 9, 2022 17:27
Convert GLSL to HLSL with 100% precision!

Convert GLSL to HLSL with 100% precision!

Have you tried translating GLSL code to HLSL and for some reason it never works, even through you've gone through it line by line? For example with noise functions.

Then do this!

  • Save your shader to a file and add to the top:
    #version 460

precision mediump float;

@makidoll
makidoll / good-ssh-settings.md
Last active August 11, 2022 23:58
Good SSH Settings

Good SSH Settings

Add key to ~/.ssh/authorized_keys

Changes to /etc/ssh/sshd_config:

  • Protocol 2 add above Port 22
  • Port 9001
  • PasswordAuthentication no
  • X11Forwarding no
@makidoll
makidoll / obj-mtl-cheat-sheet.md
Last active August 9, 2022 17:28
Obj Mtl Cheat Sheet

Obj Mtl Cheat Sheet

newmtl (material assignment) name

Ka (ambient) r g b
Kd (diffuse) r g b
Ks (specular) r g b
Ke (emission) r g b
map_K? (K? map) filename