Skip to content

Instantly share code, notes, and snippets.

@nedix
nedix / kubectl_neat_directory.sh
Last active September 7, 2023 19:09
Kubernetes neat on all files in the current directory
#!/usr/bin/env bash
find . -type f -print0 | xargs -0 -I {} sh -c 'OUTPUT=$(kubectl neat -f {}); echo "$OUTPUT" > {}'
@nedix
nedix / apt_firefox_install.sh
Last active September 3, 2024 02:18
Aptitude firefox snapshot install
#!/usr/bin/env sh
FIREFOX_VERSION=117.0.1-1
test -n "$ARCHITECTURE" || case $(uname -m) in \
amd64|x86_64) ARCHITECTURE=amd64; ;; \
arm64|aarch64|armv8b|armv8l) ARCHITECTURE=arm64; ;; \
*) echo "Unsupported architecture, exiting..."; exit 1; ;; \
esac \
&& echo "deb http://deb.debian.org/debian stable main" > /etc/apt/sources.list \
services:
client:
image: qmcgaw/gluetun:v3.39.0
cap_add:
- NET_ADMIN
sysctls:
- net.ipv4.ip_forward=1
- net.ipv6.conf.all.disable_ipv6=0
environment:
VPN_SERVICE_PROVIDER: ${WIREGUARD_CLIENT_SERVICE_PROVIDER}
# Source: https://github.com/shadowsocks/shadowsocks/wiki/Optimizing-Shadowsocks
# max open files
fs.file-max = 51200
# max read buffer
net.core.rmem_max = 67108864
# max write buffer
net.core.wmem_max = 67108864
# default read buffer
net.core.rmem_default = 65536
@nedix
nedix / drm.service
Last active September 27, 2024 22:54
/etc/systemd/system/drm.service
[Unit]
Description=Enable DRM
After=multi-user.target
Before=docker.service
[Service]
Type=oneshot
ExecStart=/usr/bin/dtoverlay vc4-fkms-v3d cma-128=on
ExecStart=/usr/bin/vcgencmd display_power 1
RemainAfterExit=yes
@nedix
nedix / drm.conf
Created September 27, 2024 22:55
/etc/modprobe.d/drm.conf
options drm edid_firmware=edid_4k60.bin
options vc4 force_hotplug=1
softdep drm post: v3d vc4
From 8161651a92b3e04be0a8e4e6a20b52d8d7355157 Mon Sep 17 00:00:00 2001
From: NEDIX <[email protected]>
Date: Sat, 5 Oct 2024 01:16:58 +0200
Subject: [PATCH] Conflicts xrdp_sec.c
---
libxrdp/xrdp_sec.c | 137 ++++++++++++++++++++++++---------------------
1 file changed, 72 insertions(+), 65 deletions(-)
diff --git libxrdp/xrdp_sec.c libxrdp/xrdp_sec.c
@nedix
nedix / gist:b1905c60743dddd52aa455e9fc3f898e
Created October 4, 2024 23:19
Conflicts xrdp_encoder.c
From 95183e139112cf958a2cabd4590dda1df94b8939 Mon Sep 17 00:00:00 2001
From: NEDIX <[email protected]>
Date: Sat, 5 Oct 2024 01:17:04 +0200
Subject: [PATCH] Conflicts xrdp_encoder.c
---
xrdp/xrdp_encoder.c | 1266 ++++++++++++++++++-------------------------
1 file changed, 538 insertions(+), 728 deletions(-)
diff --git xrdp/xrdp_encoder.c xrdp/xrdp_encoder.c
From aaf5477ae3fa28ddf47383b34969a0013b2648e8 Mon Sep 17 00:00:00 2001
From: NEDIX <[email protected]>
Date: Sat, 5 Oct 2024 01:17:12 +0200
Subject: [PATCH] Conflicts xrdp_mm.c
---
xrdp/xrdp_mm.c | 457 +++++++++++++++++++++----------------------------
1 file changed, 194 insertions(+), 263 deletions(-)
diff --git xrdp/xrdp_mm.c xrdp/xrdp_mm.c