Skip to content

Instantly share code, notes, and snippets.

View nfl0's full-sized avatar
๐Ÿ˜‹

nfl0

๐Ÿ˜‹
View GitHub Profile
@nfl0
nfl0 / Intel_I219-LM_e1000e_hardware_hang_bug.sh
Last active May 15, 2026 23:37
Fix for Intel I219-LM "e1000e Detected Hardware Unit Hang" โ€” NIC randomly drops link on Linux/Proxmox until power-cycle. Idempotent, reboot-persistent script that disables the offload + EEE/LPI triggers.
#!/usr/bin/env bash
#
# Intel I219-LM / e1000e "Detected Hardware Unit Hang" mitigation.
#
# Symptom: NIC TX engine hangs after hours/days of uptime, link drops,
# only a physical power-cycle recovers it (warm reboot does not).
# Cause: I219 silicon errata exercised by (a) hardware offloads and
# (b) EEE/LPI low-power-idle transitions. We disable BOTH triggers.
#
# Run as root after a fresh Proxmox install. Idempotent + reboot-persistent
@nfl0
nfl0 / fix-linux-suspend-reboot-crash.md
Last active March 23, 2026 04:41
Fixing PCIe-Induced Sleep Crashes

The Problem

On certain motherboards (specifically Gigabyte/Aorus), the system fails to enter $S3$ sleep, instead performing a "half-second power flash" followed by a full shutdown or instant reboot. This is often caused by the BIOS attempting to keep CPU-linked PCIe lanes (GPU/NVMe) "awake" for a wakeup signal that never comes or isn't supported by the device's Linux driver.

1. Identify the Culprits

Check which devices are permitted to wake the system:

cat /proc/acpi/wakeup

Look for GPP0, GPP8, or XHC entries that are *enabled. On many AMD systems:

  • GPP0: Typically the Primary NVMe Slot.
@nfl0
nfl0 / privacy-pools-ceremony_attestation.log
Created February 20, 2025 00:21
Attestation for Privacy Pools Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm nfl0-24908032 and I have contributed to the Privacy Pools Ceremony.
The following are my contribution signatures:
Circuit # 1 (withdraw)
Contributor # 25
Contribution Hash: 7976cdcd a6d4ea9e 49a1edff e4b05173
f8fd2b81 95200bff 0edc079c d065bd5e
73cc429c 32f46107 69e85d45 d5e91ec5
53f0af62 f6174e33 31ff405d 7c3da671
import websocket
import json
import os
import threading
import time
import subprocess
# Global variables to store dynamic values
current_price = "Fetching..."
accumulated_sent = 0
@nfl0
nfl0 / zec_monitor.py
Created December 8, 2024 00:38
monitor zcash price w/ binance websocket
import websocket
import json
import psutil
import os
import curses
import threading
import time
# Global variables to store dynamic values
current_price = "Fetching..."
@nfl0
nfl0 / guide.txt
Created November 17, 2024 23:53
Becoming a Penumbra validator
# Penumbra Validator Setup Guide
## Prerequisites
1. Ensure system meets the following requirements:
- 8GB RAM, 2-4 vCPUs, 200GB SSD storage.
- Public IP for peer-to-peer connections.
2. Install dependencies: `git`, `rustup`, and `cargo`.
---
@nfl0
nfl0 / env.txt
Created August 18, 2024 11:13
manage a python env
# create the environment
python3 -m venv myenv
# activate the env
source myenv/bin/activate
# leave the env
deactivate
# del the env dir
@nfl0
nfl0 / recovery.txt
Last active August 2, 2024 01:03
recover funds from a penumbra nft auction using the penumbra cli
1- install penumbra cli:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/penumbra-zone/penumbra/releases/latest/download/pcli-installer.sh | sh
-----------------------
2- import seed phrase:
pcli init --grpc-url https://grpc.penumbra.silentvalidator.com:443 soft-kms import-phrase
-----------------------
3- view balances
def calculate_electricity_bill(consumption_kwh):
# Define price tiers in MAD/kWh
price_tiers = [
(100, 0.9010),
(50, 1.0732),
(50, 1.0732),
(100, 1.1676),
(200, 1.3817),
(float('inf'), 1.5958)
]
import time
from blake3 import blake3
import hashlib
# Data for benchmarking
data = b"some data to hash" * 1000000
# BLAKE3 hashing and benchmarking
start_time_blake3 = time.time()
hasher_blake3 = blake3()