Skip to content

Instantly share code, notes, and snippets.

View NikolayKuraga's full-sized avatar

NikolayKuraga

View GitHub Profile
@r2k0
r2k0 / sed_snippets.sh
Last active July 15, 2024 17:09
sed examples
##FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# triple space a file
@oprizal
oprizal / nvidia-legacy-driver-340xx-on-debian-11-bullseye.md
Last active July 15, 2024 22:47
Install Nvidia legacy driver 340xx on Debian 11 Bullseye

How to Install Nvidia Legacy 340xx Driver on Debian 11 Bullseye

DE/WM: Xfce4 & i3

First of all, always update the system first.

$ sudo apt update && sudo apt upgrade
@Anakiev2
Anakiev2 / How to install nvidia-legacy-340xx-driver on Debian 12 Bookworm.md
Last active July 15, 2024 21:11
How to install nvidia-legacy-340xx-driver on Debian 12 Bookworm

How to install nvidia-legacy-340xx-driver on Debian 12 Bookworm

This guide will show you how to download, compile and install the nvidia-legacy-340xx-driver on Debian 12. Some people install the driver directly from sid but this will mix packages from both stable and unstable which may create issues. It's recommended to update and upgrade your system before you start.

Step 1. Download the source code.

Install these packages.

sudo apt install build-essential fakeroot devscripts

You can manually download the source code from debian.org and go to Step 2 or continue with Step 1. Don't worry you won't be able to install packages from sid.
Add 'deb-src http://httpredir.debian.org/debian unstable main non-free contrib' to '/etc/apt/sources.list'.