Skip to content

Instantly share code, notes, and snippets.

View derek-shnosh's full-sized avatar

Derek derek-shnosh

View GitHub Profile
@derek-shnosh
derek-shnosh / media-columns.py
Last active December 30, 2025 23:22
Nautilus "Media" Columns (Duration, Dimensions, Framerate) - Cached Data (~/.cache/nautilus-media-columns/media.sqlite3)
#!/usr/bin/env python3
import gi
gi.require_version("Gst", "1.0")
gi.require_version("GstPbutils", "1.0")
import os
import sqlite3
import pathlib
from urllib.parse import unquote
@derek-shnosh
derek-shnosh / protonvpn_patch.sh
Created December 24, 2025 00:00
Workaround for ProtonVPN GTK app crashing when launched in non-interactive or "headless" contexts (SSH, RDP, etc).
#!/usr/bin/env bash
set -euo pipefail
FILE="/usr/lib/python3/dist-packages/proton/vpn/app/gtk/services/reconnector/session_monitor.py"
# Require root
if [[ $EUID -ne 0 ]]; then
echo "Run as root (sudo)." >&2
exit 1
fi
@derek-shnosh
derek-shnosh / open-vscode.py
Last active August 7, 2024 04:44
Gnome Files (Nautilus) Context Menu - Open in VScode/Open VScode Here
# -*- coding: UTF-8 -*-
# This script is based on Tilix's "open_tilix.py" by Gerald Nunn
# - https://github.com/gnunn1/tilix/blob/master/data/nautilus/open-tilix.py
# Modified for VScode, references:
# - https://gnome.pages.gitlab.gnome.org/nautilus-python/class-nautilus-python-menu-provider.html
# - https://askubuntu.com/a/301205/643965
from gettext import gettext, textdomain
from subprocess import Popen
import shutil
@derek-shnosh
derek-shnosh / aaa-explained-reddit.md
Last active September 19, 2024 16:07
AAA Explained - Reddit

I'll step through the relevant commands from your config snippet.

Create a local user

This local admin user will be given priv-15 access if used for auth.

username admin privilege 15 secret 5 <encrypted password>

Create an AAA server group