Skip to content

Instantly share code, notes, and snippets.

View a13ssandr0's full-sized avatar

Alessandro Campolo a13ssandr0

  • Università degli Studi Mediterranea di Reggio Calabria
  • Reggio Calabria, Italy
View GitHub Profile
@a13ssandr0
a13ssandr0 / nvidia_reload.sh
Created January 27, 2026 19:51
Script for hot-unloading Nvidia kernel modules after a driver upgrade
#!/bin/bash
# WARNING: Use this script AT YOUR OWN RISK! I DO NOT take ANY responsibility
# if your system becomes unstable after using my script. You've been warned!
# With this script I'm able to unload the kernel drivers without rebooting the system.
# I'm using it on an Ubuntu Server 24.04 machine with an Nvidia GTX 1070,
# the only program using the GPU is Jellyfin's transcoder.
# It seems to be stable, the transcoder works after running this script,
# nvidia-smi no longer shows NVML error and I never had any problem with other
#!/usr/bin/python
import random
from pathlib import Path
from sys import argv
from PIL import Image, ImageDraw
@a13ssandr0
a13ssandr0 / install.sh
Created September 13, 2024 12:41
HPE SDR MCP sources.list and key for Ubuntu 24.04
#!/bin/bash
sudo curl -s --compressed -o /etc/apt/trusted.gpg.d/hpe_sdr.asc https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub
echo "deb http://downloads.linux.hpe.com/SDR/repo/mcp noble/current non-free" | sudo tee /etc/apt/sources.list.d/mcp.list
@a13ssandr0
a13ssandr0 / digits.h
Last active October 17, 2022 21:36
C++ lookup table for converting ASCII characters in 7 segment representations
/**
* C++ ASCII to 7 seg digits converter
*
* This array aims at being as complete as possible,
* if you find any character that could be added or
* modified, just leave a comment specifying
* the decimal ascii code of the character and
* the hexadecimal code of the segment combination
* hex(0b0abcdefg)
* __________
@a13ssandr0
a13ssandr0 / simple-carousel.php
Created April 23, 2022 09:32
Demo of a lightweight scrolling list made exclusively with native HTML, CSS, JavaScript (no external libraries).