Skip to content

Instantly share code, notes, and snippets.

View DeadlySquad13's full-sized avatar
๐Ÿš€

DeadlySquad13 DeadlySquad13

๐Ÿš€
View GitHub Profile
@mawkler
mawkler / auto-symlinking-nix-directory.md
Last active January 12, 2026 22:45
A home-manager directory that auto-creates dotfile symlinks to it in `~/.config/` based on the file structure

The code below lets you create a directory in your home-manager config that auto-creates symlinks for non-Nix dotfiles from ~/.config/ using xdg.configFile and mkOutOfStoreSymlink. This gives the following advantages:

  1. You can keep all your non-Nix dotfiles in your home-manager repo.
  2. You don't have to do home-manager switch on each dotfile change. Changes are instantly reflected.
  3. You don't need to hard-code the paths for each symlink, the linking is instead file-based. Just add the new dotfile to the directory, and you're done.

For example, if your home-manager config is in ~/nixos/ and looks like this...:

~/nixos
@mark-akturatech
mark-akturatech / Arch Install Guide 2025 - PART 1 - Secure Boot and Encrypted Device.md
Last active December 30, 2025 11:13
Arch Install Guide 2025 - PART 1 - Secure Boot and Encrypted Device

Arch Install Guide 2025 - PART 1

Secure Boot and Encrypted Device

Precursor

This guide will install Arch Linux on a Secure Boot enabled drive using block level at-rest LUKS encryption with passwordless unlocking using TPM. TPM will issue an passkey if and only if Secure Boot is enabled and the system firmware has not been altered. We will also be creating a unified kernel image so that we can boot Linux directly in the EFI partition without requiring a boot loader.

We will also be creating a backup key to enable booting of the drive in case of BIOS upgrade or other event that may make TPM not serve the key. The code should obviously be stored securely elsewhere off system.

@iagoleal
iagoleal / lua.lua
Created September 10, 2021 20:11
Properly open lua and fennel required files via gf
local fmt = string.format
-- Iterator that splits a string o a given delimiter
local function split(str, delim)
delim = delim or "%s"
return string.gmatch(str, fmt('[^%s]+', delim))
end
-- Find the proper directory separator depending
-- on lua installation or OS.
@jacekkopecky
jacekkopecky / index.js
Created May 20, 2021 16:47
Custom javascript for github.com projects: In GitHub project boards, double click on a card, or select a card and press 'e' to edit it.
// double click on a card, or select a card and press e, to edit it
document.addEventListener('keyup', (e) => {
if (e.key === 'e' && document.activeElement?.classList.contains('project-card')) {
const buttons = document.activeElement.querySelectorAll('details button[role=menuitem]');
for (const btn of buttons) {
if (btn.textContent === 'Edit note') btn.click();
}
}
});
@ecosse3
ecosse3 / update-neovim-nightly.sh
Last active December 13, 2025 03:43
Update Neovim Nightly from latest github release
#!/bin/bash
# Colors definitions
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
BOLD=$(tput bold)
NORMAL=$(tput sgr0)
# Check if necessary applications are installed