Skip to content

Instantly share code, notes, and snippets.

View glats's full-sized avatar
😺
Im on #cat-v mostly

Juan Cuzmar glats

😺
Im on #cat-v mostly
View GitHub Profile
@glats
glats / guia-5ghz-fresh-install.md
Created March 3, 2026 02:32
Stabilizing 5 GHz Wi-Fi on OnePlus 5 -- postmarketOS edge

Stabilizing 5 GHz Wi-Fi on OnePlus 5 -- postmarketOS edge

Device: OnePlus 5 (oneplus-cheeseburger, msm8998)
Wi-Fi chip: WCN3990 (ath10k_snoc)
Kernel: linux-postmarketos-qcom-msm8998 (Linux 6.0.x)
OS: postmarketOS edge (Alpine edge + systemd)

All commands in this guide run directly on the device as root (via doas sh or doas -s). The device is assumed to have a working internet connection (e.g. via 2.4 GHz Wi-Fi or USB tethering).

@glats
glats / xrdp-nvidia-arch.md
Last active March 5, 2026 21:37
XRDP + NVIDIA renderD129 (Arch)

Arch + xRDP + RFX — working stack (no memory leak, correct colors)

Disclaimer

This gist was drafted with help from an AI assistant based on a live debugging session. Verify details before applying to your system.

TL;DR

Use xorgxrdp (non-glamor) with RFX codec. The glamor build (xorgxrdp-glamor) has a GEM shmem leak that causes OOM regardless of GPU or kernel version. Software rendering avoids the leak entirely with no visible performance penalty.

@glats
glats / download_macos.sh
Created October 27, 2025 20:48
Download ISO MacOS
#!/usr/bin/env bash
set -Eeuo pipefail
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
@glats
glats / export-copilot-chat.sh
Created October 9, 2025 22:58
export chat from vscode workspace copilot
#!/usr/bin/env bash
# export-copilot-chat.sh
# Interactive script to list and export VSCode Copilot chat sessions to Markdown
# --- Detect default baseDir depending on OS ---
detect_default_basedir() {
case "$(uname -s)" in
Linux)
echo "$HOME/.config/Code/User/workspaceStorage"
;;
@glats
glats / README.md
Created July 16, 2025 02:13 — forked from jelovac/README.md
Ubuntu Mate 20.04 XRDP setup

Ubuntu Mate 20.04 XRDP setup

Documenting XRDP setup which worked for me on Ubuntu Mate 20.04.

Some parts are taken from: http://c-nergy.be/blog/?p=14093.

Install xrdp

sudo apt install xrdp
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer><family>Symbols Nerd Font</family></prefer>
</alias>
<alias>
<family>Heavy Data</family>
<prefer><family>Symbols Nerd Font</family></prefer>
@glats
glats / lazyvim_notes.md
Last active August 30, 2025 02:42
Lazyvim notes

Vim Motions & Operators Cheat-Sheet

1. Basic Cursor Movement

Action Command
Left h
Down j
Up k
Right l
Start of line 0
@glats
glats / setting.json
Created March 14, 2025 19:09
Cursor own config
{
"window.commandCenter": 1,
"makefile.configureOnOpen": false,
"git.confirmSync": false,
"window.zoomLevel": 0,
"workbench.editor.enablePreview": false,
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/.history": true,
@glats
glats / gist:2f8cde3c75e326661541812318222339
Created January 6, 2025 14:22
gedora 40-41 gnome remote desktop selinux problem
tee /tmp/grd.te << EOF > /dev/null
module grd 1.0;
require {
type system_dbusd_t;
type unconfined_service_t;
type xdm_t;
class tcp_socket { getattr getopt read setopt shutdown write };
}
allow system_dbusd_t unconfined_service_t:tcp_socket { read write };
allow xdm_t unconfined_service_t:tcp_socket { getattr getopt read setopt shutdown write };
After searching around, I found the following bug, which explains the cause of the problem and documents a workaround:
https://bugzilla.rpmfusion.org/show_bug.cgi?id=7090
Following the advice in that bug report, I successfully worked around the problem as follows:
$ sudo systemctl edit systemd-homed
Then add these lines to the config file:
[Service]
Environment="SYSTEMD_HOME_LOCK_FREEZE_SESSION=false"