Skip to content

Instantly share code, notes, and snippets.

View felipelalli's full-sized avatar
👻
boo

Felipe Mica felipelalli

👻
boo
View GitHub Profile
@felipelalli
felipelalli / guia-audio-lenovo-legion-nixos_en.md
Created July 14, 2025 06:29
Guide: Fixing Speaker Audio on Lenovo Legion Pro 7 with NixOS

Guide: Fixing Speaker Audio on Lenovo Legion Pro 7 with NixOS

This guide details the process to resolve the lack of sound from the internal speakers on the Lenovo Legion Pro 7 16IRX9H notebook running NixOS. The issue occurs because the default audio driver (snd_hda_intel) fails to correctly initialize the amplifiers for the Realtek ALC287 codec present in this hardware.

The solution involves applying a specific firmware patch declaratively, leveraging the robustness of NixOS.

Thanks to Felipe "Noksys" Lalli for debugging and documenting the solution in his NixOS configuration repository, noksys/genoc.


@felipelalli
felipelalli / stash_dropped.md
Last active May 28, 2020 04:12 — forked from joseluisq/stash_dropped.md
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.