Skip to content

Instantly share code, notes, and snippets.

View kekneus373's full-sized avatar

kekneus373

View GitHub Profile
@kekneus373
kekneus373 / x-gvfs-show.txt
Created February 26, 2026 13:26
[SAMBA] Show mounted shares in file managers
Below is a practical way to have a Samba (CIFS) share that you already mount via /etc/fstab appear automatically in the side‑pane of your file manager (Pcmanfm, GNOME Files, etc.).
The trick is to tell the GVFS layer that the mount point should be treated like a “bookmark” – this is done with the x-gvfs-show mount option.
1. Edit the fstab entry
Add (or modify) the line for the share so it includes the x-gvfs-show option.
A typical CIFS entry looks like this:
//server.example.com/share /mnt/samba_share cifs credentials=/home/you/.smbcredentials,iocharset=utf8,uid=1000,gid=1000,_netdev 0 0
Add the two extra options users (so you can mount/unmount as a normal user) and x-gvfs-show:
@kekneus373
kekneus373 / zswap-vs-zram.md
Created February 14, 2026 21:56
[AI Explanation] Zswap Vs Zram - Which To Use?

Based on the search results, here's a breakdown of zswap vs zram:

Key Differences

Zswap is a compressed cache that works alongside a traditional swap device (on disk/SSD). When RAM fills up, pages are compressed in memory first, and when the compressed pool fills, the least recently used pages are written to disk swap.[1][5]

Zram creates a compressed RAM disk that acts as swap entirely in memory, with no disk swap required by default (though it can be configured with a backing device).[1][5]

Which Should You Use?

@kekneus373
kekneus373 / sed-remove-linebreaks.md
Created February 10, 2026 18:20
Remove Line Breaks with Sed

Remove Line Breaks with Sed

sed operates on lines, excluding the newline character, so it cannot directly remove newlines within a line using standard commands. The newline is stripped before processing and added back after. To remove or replace newlines, you need special techniques:

  • Replace all newlines with spaces:
    sed -e ':a;N;$!ba;s/\n/ /g' file

This reads the entire file into the pattern space and replaces all newlines with spaces.

@kekneus373
kekneus373 / asus-p9x79ws-iommu.md
Created February 10, 2026 16:47
[PROXMOX] PCIe Passthrough on Asus P9X79-WS

Step 1. RTFM

https://pve.proxmox.com/wiki/PCI_Passthrough


Step 2. IRQ Remapping X2APIC

The message "x2apic: IRQ remapping doesn't support X2APIC mode" indicates that the system's IOMMU (Intel VT-d or AMD-Vi) is not properly enabled or configured, which is required for X2APIC mode to function, especially for PCI passthrough.

@kekneus373
kekneus373 / 2011-aes-proxmox.md
Created February 8, 2026 20:12
Xeon s2011 AES Support

Xeon 2011 AES Support

x86-64-v2-AES is a QEMU/KVM CPU model that includes the AES-NI (Advanced Encryption Standard New Instructions) instruction set, which accelerates encryption and decryption operations.

For Intel Xeon processors supporting the LGA 2011 socket (such as the Xeon E5-2640 v2), the x86-64-v2-AES CPU type is supported only if the CPU supports the required instruction sets.

  • LGA 2011 Xeon processors (e.g., Xeon E5-2640 v2) based on the Ivy Bridge-EP or Haswell-EP microarchitectures do support:
    • SSE4.1, SSE4.2, SSSE3, POPCNT
  • AES-NI (AES instruction set) – confirmed in the LGA 2011 specifications.
@kekneus373
kekneus373 / proxmox-cache.md
Created February 8, 2026 20:11
Best Cache Option Proxmox

Best Cache Option Proxmox

The best cache option in Proxmox depends on your storage type, performance needs, and data safety requirements.

  • For local SSDs or fast storage with a BBU-backed RAID controller: Use cache=writeback for best performance, especially for write-heavy workloads. It offers high IOPS but carries a risk of data loss during power failure. Ensure you have a UPS and proper backup.

  • For SANs, NFS, or remote storage (e.g., Synology, Ceph): Use cache=none or cache=writethrough. Most SANs already have internal write-back caching, so enabling writeback at the Proxmox level provides little benefit and may increase risk. cache=none bypasses the host page cache, reducing overhead and improving consistency with remote storage.

  • For ZFS storage: cache=none is often recommended, as ZFS already manages its own ARC (cache). Enabling additional caching can cause performance degradation due to double buffering.

@kekneus373
kekneus373 / sil3114-linux.md
Created February 8, 2026 16:06
Sil3114 compatibility under Linux (untested)

Silicon Image SiI 3114 Linux

Silicon Image SiI3114 is a PCI-based Serial ATA (SATA) controller that supports up to four SATA drives and can operate in either non-RAID "SATALink" or RAID-capable "SATARaid" modes, depending on firmware.

Kernel Support

  • The SiI3114 is supported in modern Linux kernels via the sata_sil driver (for kernel versions 2.6.19 and later).
  • Ensure your kernel has the following configuration enabled:
    • CONFIG_ATA
  • CONFIG_SATA_SIL
@kekneus373
kekneus373 / use-tmux.md
Created January 13, 2026 17:22
tmux and never lose SSH again

To use tmux for a persistent Midnight Commander session that survives SSH disconnections:

Starting a persistent session

  1. SSH into your server and start tmux:
    ssh your-server
    tmux new -s mc
@kekneus373
kekneus373 / zfs-vs-ext4-single-drive.md
Created January 13, 2026 17:21
ZFS vs Ext4 Single-drive Pool

For a single-drive pool, both ZFS and ext4 are viable options, but they serve different purposes:

ZFS advantages on a single disk:

  • Data integrity: Detects corruption through checksumming (though it can't auto-repair without redundancy)[1][8]
  • Snapshots and compression: Built-in features that ext4 lacks[1][4]
  • Future flexibility: Easy to convert to a mirrored pool later by adding another drive[1]
  • Self-healing with copies=2: You can set ZFS to store multiple copies of data on the same disk, enabling some corruption recovery[1]

ext4 advantages:

  • Lower overhead: Less resource-intensive (RAM, CPU) than ZFS[3][4]
@kekneus373
kekneus373 / recurscively-find-n-remove-files.md
Created January 12, 2026 21:24
Recursively find and remove files by extension in Linux

To find and remove files by extension in a directory and its subdirectories on Linux, you can use the command: find /path/to/dir -name "*.extension" -type f -delete, replacing /path/to/dir with your directory path and *.extension with the specific file extension you want to delete. For example, to remove all .txt files, use find /path/to/dir -name "*.txt" -type f -delete.