Skip to content

Instantly share code, notes, and snippets.

View alejandro-du's full-sized avatar
💭
Looking for my next challenge in DevRel

Alejandro Duarte alejandro-du

💭
Looking for my next challenge in DevRel
View GitHub Profile
############################################################################################
# 1. Create the operational table (users) and the cache table (users_session_cache).
# Make sure that the cache table uses MariaDB's MEMORY storage engine.
############################################################################################
CREATE OR REPLACE TABLE users(
id SERIAL PRIMARY KEY,
name VARCHAR(50) NOT NULL UNIQUE,
session_id VARCHAR(50)
) ENGINE=InnoDB;
@alejandro-du
alejandro-du / debian-11-to-12-upgrade.sh
Created May 30, 2025 12:34
Upgrade steps from Debian 11 to 12 on Raspberry Pi, including Docker and .zst fix.
# 1. Clean and fully upgrade Debian 11 system
sudo apt update && sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove --purge -y
sudo apt clean
# 2. Replace "bullseye" with "bookworm" in official sources
sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/raspi.list
@alejandro-du
alejandro-du / config.yml
Created February 17, 2026 18:54
Custom Lazydocker command for running new containers
customCommands:
images:
- name: "Run New Container"
attach: true
shell: true
command: >
DEFAULT_IMAGE="{{ .Image.Name }}";
DEFAULT_IMAGE=${DEFAULT_IMAGE:-mariadb};
read -p "Image (default: $DEFAULT_IMAGE): " CIMAGE;
CIMAGE=${CIMAGE:-$DEFAULT_IMAGE};