Skip to content

Instantly share code, notes, and snippets.

@wngtk
wngtk / install-arch.md
Created October 25, 2024 08:24 — forked from mjnaderi/install-arch.md
Installing Arch Linux with Full Disk Encryption (LVM on LUKS)

Installing Arch Linux with Full Disk Encryption

If you're aiming for a seamless Arch Linux installation in UEFI mode, follow along as this guide will walk you through the process step by step. We'll be using LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) partitions on LUKS to achieve full disk encryption.

Note: I have updated this doc for UEFI mode. For those with BIOS/MBR systems, you can refer to the previous version, but keep in mind that it might be outdated and no longer accurate.

If you're only interested in installing Linux and not setting up dual boot with Windows, feel free to skip the Windows-related sections.

@wngtk
wngtk / remapping.ahk
Last active September 23, 2024 14:31
Change Caps Lock to Control when held down; otherwise, Escape
; Change Caps Lock to Control when held down; otherwise, Escape
;
; Originally based on the comment provided in
; [this](https://gist.github.com/volks73/1e889e01ad0a736159a5d56268a300a8?permalink_comment_id=4688167#gistcomment-4688167)
; Github Gist.
;
; A shortcut should be created for this script and placed in the Windows 10/11
; user's startup folder to automatically enable the feature on boot/startup.
; The user's startup folder can be found using the following steps:
;
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
"BingSearchEnabled"=dword:00000000
@wngtk
wngtk / hostip.py
Created June 11, 2023 01:52
Print Windows WLAN IPv4 address in WSL.
import os
pipe = os.popen('ipconfig.exe')
text = pipe.buffer.read().decode('gbk')
ip_line = (line for line in text.split('\r\n') if 'IPv4' in line)
try:
ip_addr = next(ip_line).split(':')[-1].strip()
print(ip_addr)
except StopIteration:
exit(1)