Skip to content

Instantly share code, notes, and snippets.

View dgalli1's full-sized avatar

Damian Galli dgalli1

View GitHub Profile
@dgalli1
dgalli1 / sandboxed-shell.sh
Last active June 23, 2026 12:56
LLM Sandbox Bubblewrap with Podman support
#!/usr/bin/env bash
#
# Rootless Podman inside a bubblewrap sandbox.
# ------------------------------------------------------------------------------
# WHY PODMAN AND NOT DOCKER
# Docker needs a privileged daemon (dockerd). Rootless-docker still wants its
# own daemon + slirp4netns and is painful to nest. Podman is daemonless and
# rootless, so it is the realistic thing to run inside bwrap.
#
# THE TRICKS THAT MAKE IT WORK INSIDE A USER NAMESPACE
@dgalli1
dgalli1 / install_php85.sh
Last active May 5, 2026 08:06
Install PHP With all extensions on arch
PHPVER=85
sudo pacman -S $(pacman -Ss "^php${PHPVER}-" | awk '/^repo\// {print $1}' | sed 's/^repo\///')
sudo install -d /etc/systemd/system/php${PHPVER}-fpm.service.d
sudo tee /etc/systemd/system/php${PHPVER}-fpm.service.d/override.conf > /dev/null <<EOF
[Service]
User=${USER}
Group=${USER}
PermissionsStartOnly=true
ExecStartPre=/usr/bin/mkdir -p /run/php${PHPVER}-fpm
ExecStartPre=/usr/bin/chown -R ${USER}:${USER} /run/php${PHPVER}-fpm
@dgalli1
dgalli1 / deepdeck.yaml
Last active February 3, 2026 17:20
EspHome Deepdeck Ahuyama Deepsea
esphome:
name: deepdeck-ahuyama
esp32:
board: esp32dev
framework:
type: esp-idf
wifi:
ssid: !secret wifi_ssid
@dgalli1
dgalli1 / convert.sh
Created July 19, 2025 14:58
patch pocketbook image
#!/bin/bash
set -euo pipefail
IMG="flash.img"
DEVICE="/dev/sdb"
SERIAL_STRING_OFFSET=0x05B00000
# Your new ASCII serial number
NEW_TEXT_SERIAL="YT4409007156...."
@dgalli1
dgalli1 / freecad-git.sh
Last active September 21, 2025 04:17
Create a github Repository For Freecad with string comparision
#!/bin/bash
BASE_DIR="$HOME/git/cad"
# Check if a repository name was provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <repository-name>"
exit 1
fi
"""Config flow to configure the Meteo-Swiss integration."""
import logging
import re
from typing import Any
import voluptuous as vol
from hamsclientfork import StationType, meteoSwissClient
from homeassistant import config_entries
from homeassistant.helpers import issue_registry as ir
from homeassistant.helpers.issue_registry import IssueSeverity
@dgalli1
dgalli1 / .sh
Created November 15, 2023 16:56
Simple update script for docker compose
#!/bin/bash
echo "Now Updating all Docker Containers"
export TZ=UTC # force all timestamps to be in UTC (+00:00 / Z)
printf -v start_date_epoch '%(%s)T'
printf -v start_date_iso8601 '%(%Y-%m-%dT%H:%M:%S+00:00)T' "$start_date_epoch"
# List of all folders that contain a docker compose
declare -a StringArray=("auth-stack" "bitwarden" "languagetool" "media-stack" "monitoring" "" "mosquitto" "portainer" "dnsmasq" "socks5" "nginx-proxy-manager" "filebrowser")
# Iterate the string array using for loop
@dgalli1
dgalli1 / style.css
Created April 26, 2023 09:19
jellyfin big music image
.nowPlayingPage {
position: relative;
}
@media only screen and (min-width: 1080px) {
.nowPlayingPageImageContainer {
width: 57%;
}
.nowPlayingInfoControls {
justify-content: start !important;
#!/bin/bash
echo "Now Updating all Docker Containers"
export TZ=UTC # force all timestamps to be in UTC (+00:00 / Z)
printf -v start_date_epoch '%(%s)T'
printf -v start_date_iso8601 '%(%Y-%m-%dT%H:%M:%S+00:00)T' "$start_date_epoch"
# Declare an array of string with type
declare -a StringArray=("auth-stack" "bitwarden" "filerun" "languagetool" "media-stack" "monitoring" )
@dgalli1
dgalli1 / SystemInformation
Last active December 8, 2021 20:18
debug horizon
Computer Information:
Manufacturer: Micro-Star International Co., Ltd.
Model: X370 KRAIT GAMING (MS-7A33)
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 7 1700 Eight-Core Processor
CPU Family: 0x17