Skip to content

Instantly share code, notes, and snippets.

{
"gpt-4o-mini": {
"prompt": 0.15,
"completion": 0.6,
"max": 131072
},
"gpt-4o": {
"prompt": 2.5,
"completion": 10,
#!/bin/bash
# system
SRC=[
system/lineage/waydroid_x86_64/VANILLA.json
system/lineage/waydroid_x86_64/GAPPS.json
vendor/waydroid_x86_64/MAINLINE.json
]
@morgan9e
morgan9e / flatpak-alt
Created February 13, 2026 03:48
Flatpak wrapper for multi-profile
#!/bin/bash
set -euo pipefail
PROFILE="default"
usage() {
echo "Usage: flatpak-alt [-p PROFILE] run <app-id> [args...]"
echo " flatpak-alt -p work run org.mozilla.firefox"
exit "${1:-0}"
}
@morgan9e
morgan9e / wifi-hook-snu_guest
Last active March 4, 2026 07:46
nm dispatcher for captive portal (snu_guest, KT_Starbucks, ...)
#!/bin/bash
#
# /etc/NetworkManager/dispatcher.d/99-wifi-hook
INTERFACE="$1"
ACTION="$2"
CONN="$CONNECTION_ID"
LOCKDIR="/tmp/nm-wifi-hook-$CONN.lock"
run_hook() {
@morgan9e
morgan9e / desktop-file-list
Created March 4, 2026 07:47
List all applications on XDG
#!/bin/bash
parse_desktop_file() {
local file="$1"
local section=""
local mainexec=""
local mainname=""
while IFS= read -r line || [[ -n "$line" ]]; do
[[ "$line" =~ ^[\;\#] || -z "$line" ]] && continue
@morgan9e
morgan9e / uzip
Created March 4, 2026 07:57
Not unzip dumping all files to cwd
#!/bin/bash
if [ ! -f $1 ]; then echo No file provided.; exit 1; fi
F=${1%.*};
if [ -d "$F" ]; then echo Already Exists.; exit; fi
mkdir "$F";
unzip -d "$F" "$1";
@morgan9e
morgan9e / open_screencast.py
Created March 4, 2026 07:59
open piepwire screencast node for you to use in gst pipeline
#!/usr/bin/env python3
import sys
import signal
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GLib
REQUEST_IFACE = "org.freedesktop.portal.Request"