Skip to content

Instantly share code, notes, and snippets.

@nat-418
nat-418 / nix-home-manager-neovim-setup.md
Last active November 9, 2025 23:29
Manage Neovim plugins (and more!) with Nix and Home Manager

Manage Neovim plugins (and more!) with Nix and Home Manager

Highly extensible software like Emacs, Vim, and Neovim tend to grow their own package managers. A software developer, for example, might want to install editor plugins that hook into a particular programming language's linter or language server. The programmer's text editor is therefore extended to support managing additional software to extend the text editor. If this loop continues for too long, the programmer's editor becomes more delicate and complex. The remedy for this problem is to manage software using dedicated tools apart

@mihirchanduka
mihirchanduka / Arch_Linux_Install_Guide.md
Last active October 13, 2025 13:12
Arch Install Guide with BTRFS, Full Disk Encryption and Encrypted Swap Partition

Arch Linux Installation Guide


Guide to install Arch Linux on an EFI System. Includes these features:

  • Full Disk Encryption with LUKS
  • BTRFS with @ and @home subvolumes
  • Timeshift Backups
  • Encrypted Swap Partition
  • rEFInd bootloader
  • SDDM display manager
  • KDE Plasma desktop environment
@davesteele
davesteele / curses_demo.py
Last active November 18, 2025 03:20
A Python asyncio curses template
#
# This file supports http://davesteele.github.io/development/2021/08/29/python-asyncio-curses/
#
import asyncio
from abc import ABC, abstractmethod
from curses import ERR, KEY_RESIZE, curs_set, wrapper
import _curses
@GabriOliv
GabriOliv / syscall_table_x86.md
Created February 28, 2021 21:16
Syscall Table x86 Linux for Assembly Programming

Syscall x86 Linux ASM

Extracted from W3Challs Syscalls

# Name eax ebx ecx edx esi edi ebp Definition
0 restart_syscall 0x00 - - - - - - kernel/signal.c:2501
1 exit 0x01 int error_code - - - - - kernel/exit.c:1095
2 fork 0x02 - - - - - - arch/x86/kernel/process.c:271
3 read 0x03 unsigned int fd char *buf size_t count - - - fs/read_write.c:460
@jirihnidek
jirihnidek / sub-sub-command.py
Last active September 12, 2025 19:04
Python example of using argparse sub-parser, sub-commands and sub-sub-commands
"""
Example of using sub-parser, sub-commands and sub-sub-commands :-)
"""
import argparse
def main(args):
"""
Just do something
@selimslab
selimslab / get_gists.py
Last active December 23, 2023 15:52 — forked from leoloobeek/get_gists.py
Download all gists of a user
import sys
from subprocess import call
import json
import os
import requests
def download_gists(gists: list):
for gist in gists:
call(["git", "clone", gist["git_pull_url"]])
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active December 11, 2025 09:48
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@bitsurgeon
bitsurgeon / youtube.md
Last active November 6, 2025 14:54
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">
@tuxfight3r
tuxfight3r / socat-forward-tcp.sh
Created April 18, 2019 14:15 — forked from drmalex07/socat-forward-tcp4-to-tcp6.sh
Tunnel TCP traffic via socat. #socat
#!/bin/bash
PUBLIC_IP4_IFACE=eth2
LISTEN_IFACE=${PUBLIC_IP4_IFACE}
listen_address=$(ip -f inet addr show dev ${LISTEN_IFACE} | grep -Po 'inet \K[\d.]+')
listen_port=${1}
target_host=${2}
target_port=${3}