Skip to content

Instantly share code, notes, and snippets.

View Vitexus's full-sized avatar
🤖
Coding as usual

Cybervitexus Vitexus

🤖
Coding as usual
View GitHub Profile

Debian Trixie and the New deb822 Format for APT Sources

Introduction

Since February 2025, Debian 13 (Trixie) and APT introduced the deb822 format for managing APT sources. This new format replaces the traditional /etc/apt/sources.list file with the more structured and readable /etc/apt/sources.list.d/debian.sources file.

This change was introduced by APT, starting with an update that enabled users to run:

apt modernize-sources

This command automatically converts the old sources.list format to the new deb822 format.

@yorickdowne
yorickdowne / friday.md
Last active October 13, 2025 12:06
Debian 13 trixie upgrade

Debian 13

Caution Upgrading from Debian 12 to Debian 13 on machines with mdadm has intermittently failed for me; symptom is that grub EFI is not up to date and system boots into BIOS. Root cause under investigation; it might not be related to mdadm.

To start, read the official release notes.

If your install fits into "vanilla Debian plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Debian 13 "trixie" from Debian 12 "bookworm" can be helpful. 3rd-party repos are handled with a find command.

Note upgrade is only supported from Debian 12 to Debian 13. If you are on Debian 11, upgrade to Debian 12 first. Then once on Debian 12, you can upgrade to Debian 13.

@ansulev
ansulev / install-java-temurin-debian-12.txt
Created December 15, 2023 12:56
Install Java 8 or 11 on Debian 12
mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
apt update
apt install temurin-8-jdk
@code-boxx
code-boxx / 0-PHP-DAEMON.MD
Last active August 17, 2023 17:13
PHP Daemon

SIMPLE PHP DAEMON

https://code-boxx.com/simple-php-daemon/

LICENSE

Copyright by Code Boxx

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

@0x7d7b
0x7d7b / RPI_OTG.md
Last active September 19, 2022 22:03
Raspberry Pi Zero - Bridge Network Setup

The goal of this article is to explain how to install one or many Raspberry Pi 3 B+ devices connected with one to four Raspberry Pi Zero 1.3 devices each via USB OTG networking.

Preview

Each device - Pi and Zero - will be connected to the network 192.168.0.0/24. Each Zero will be connected via USB OTG to the Pi. That will establish a network between the two devices. On each Pi a network bridge will be configured to forward the traffic between the Pi ethernet port and the connected USB ports.

Their individual hostname/IP pattern will be:

10.lab | 192.168.0.10 (1st Pi)
20.lab | 192.168.0.20 (2nd Pi)
package main
import (
"context"
"fmt"
v1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
ctrl "sigs.k8s.io/controller-runtime"
@stenito
stenito / publicip.php
Last active March 3, 2025 06:17
Get public IP address (or wan IP address) with php function
<?php
function getPublicIP() {
// create & initialize a curl session
$curl = curl_init();
// set our url with curl_setopt()
curl_setopt($curl, CURLOPT_URL, "http://httpbin.org/ip");
// return the transfer as a string, also with setopt()
@serhiikamolov
serhiikamolov / pre-commit
Last active November 25, 2022 18:44
Git pre-commit hook with phpcs, phpstan and phpunit
#!/usr/bin/env bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "\n${GREEN}Running pre-commit hook${NC}"
# Get list of the modified files
@radimih
radimih / main.yml
Created November 27, 2020 09:14
Ansible: stop systemd service if exists
- name: Disable and stoping service if exists
systemd:
service: "{ service name }"
enabled: no
state: stopped
register: result_systemd_stop
failed_when: "result_systemd_stop is failed and 'Could not find the requested service' not in result_systemd_stop.msg"
#!/bin/bash
# Put this shell script under /etc/letsencrypt/renewal-hooks/post to auto update plex SSL with Let's Encrypt.
HOSTNAME="$(hostname -f)"
openssl pkcs12 -export -out /var/lib/plexmediaserver/certificate.pfx -inkey /etc/letsencrypt/live/${HOSTNAME}/privkey.pem -in /etc/letsencrypt/live/${HOSTNAME}/cert.pem -certfile /etc/letsencrypt/live/${HOSTNAME}/chain.pem -passout pass:
chown plex:plex /var/lib/plexmediaserver/certificate.pfx
sleep 5
systemctl restart plexmediaserver.service