Skip to content

Instantly share code, notes, and snippets.

View geraldurbas's full-sized avatar

Gerald Urbas geraldurbas

View GitHub Profile
@geraldurbas
geraldurbas / gist:245c88c6d2d8eb56ac5cbb93aa2ec971
Created November 5, 2026 06:41
Breitere virtuelle Monitore für Linux ( mehrplatz mit Rustdesk)
cvt 3840 1080 60
xrandr --newmode "3840x1080_60.00" 341.50 3840 4088 4496 5152 1080 1083 1093 1108 -hsync +vsync
xrandr --addmode Virtual-1 "3840x1080_60.00"
xrandr --output Virtual-1 --mode "3840x1080_60.00"
@geraldurbas
geraldurbas / hermes-gateway.service
Created September 28, 2026 00:55
systemd /etc/systemd/system/hermes-gateway.service
[Unit]
Description=Hermes AI Agent Gateway
After=network.target docker.service
Requires=docker.service
[Service]
Type=simple
User=root
WorkingDirectory=/root/.hermes/hermes-agent
Environment=PYTHONPATH=/root/.hermes/hermes-agent
@geraldurbas
geraldurbas / coolify_cert_overview.sh
Last active August 24, 2026 19:36
Examine Coolify Traeffic certificates
#!/bin/bash
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
NC='\033[0;0m'
themes function.php ---
add_action('admin_init','load_admin_shipping_cost_bug');
function load_admin_shipping_cost_bug() {
global $pagenow;
if (is_admin() && $pagenow=='admin.php') {
wp_enqueue_script('custom_js_jquery_ui',get_stylesheet_directory_uri() . '/shipping_cost_bug.js',array('jquery'));
}
}
@geraldurbas
geraldurbas / psql-with-gzip-cheatsheet.sh
Created December 16, 2024 12:06 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@geraldurbas
geraldurbas / gist:0af131713416e40cdfa3bc363c63a344
Created November 8, 2024 22:26
SQL: replace Lightspeed Webshop URLs in WooCommerce Exported Products
SELECT post_content,
REGEXP_REPLACE(post_content, 'https://static\\.webshopapp\\.com/shops/1234/files/[0-9]+/', 'https://new-url.com/fixed/path/')
FROM `db606006_1`.`eucph_posts`
WHERE
post_content REGEXP 'https://static\\.webshopapp\\.com/shops/1234/[^\"\\s]*';
EXPLAIN UPDATE eucph_posts
SET post_content = REGEXP_REPLACE(post_content, 'https://static\\.webshopapp\\.com/shops/1234/files/[0-9]+/', 'https://rechtwp.de/wp-content/uploads/2024/11/')
@geraldurbas
geraldurbas / gist:fe7702527be806e7da67be0d725b5341
Last active October 25, 2024 13:36
Fast PDF Conversion on Windows with Libreoffice
"C:\Program Files\LibreOffice\program\soffice.exe" --headless --convert-to pdf *.ods
@geraldurbas
geraldurbas / zfs_cleanup.sh
Last active October 15, 2024 22:40 — forked from jstutters/zfs_cleanup.sh
Find and delete multiple ZFS snapshots
zfs list -t snapshot -H -o name | grep "201509[0-9].*" | xargs -n1 echo
# zfs list -t snapshot -H -o name | grep "201509[0-9].*" | xargs -n1 zfs destroy
zfs list -r -t snapshot -o name BusinessData/Strato-varwww | grep "2024-07" | xargs -n1 echo
zfs list -r -t snapshot -o name BusinessData/Strato-varwww | grep "2024-07" | xargs -n1 zfs destroy