Skip to content

Instantly share code, notes, and snippets.

View nmcdaines's full-sized avatar

Nate Daines nmcdaines

View GitHub Profile
# Translations Guide
> A comprehensive reference for internationalisation (i18n) and localisation (l10n) in modern software projects.
---
## Table of Contents
1. [Introduction](#introduction)
2. [Key Concepts](#key-concepts)
#!/usr/bin/env bash
# Default to empty string if not set
DB_HOST="${DB_HOST:-}"
DB_USER="${DB_USER:-}"
API_KEY="${API_KEY:-}"
# URL encode helper (uses python3 if available)
urlencode() {
python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$1"
@nmcdaines
nmcdaines / setup.sh
Created February 8, 2026 02:59
Fresh machine setup script (Fedora)
#!/usr/bin/env bash
## Ensure repositories are added
# sudo dnf copr enable scottames/ghostty -y
if ! dnf repolist --enabled 2>/dev/null | grep -q google-chrome; then
sudo dnf config-manager addrepo --from-repofile=https://dl.google.com/linux/chrome/rpm/stable/x86_64
fi
GRUB_TIMEOUT=30
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
#GRUB_TERMINAL_OUTPUT="console"
GRUB_TERMINAL_OUTPUT="gfxterm"
#GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau resume=UUID=ef9937f5-64ff-44f4-b291-3993c4f8b9a5 rhgb quiet video=1600x1200 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau"
GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau resume=UUID=ef9937f5-64ff-44f4-b291-3993c4f8b9a5 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
/**
* Sorts an array of arrays by size and contents
*
* e.g. [
* ["A"],
* ["A", "B"],
* ["C"]
* ]
*/
@nmcdaines
nmcdaines / other-keybindings
Created July 7, 2023 02:29
Other keybindings
# Chrome
Select an element
Cmd + Shift + C
@nmcdaines
nmcdaines / nvim-keybindings
Last active July 5, 2023 22:23
Nvim key bindings
# Rip Grep
Fuzzy search
<leader> ps
# Nvim Tree
Find current file in tree
<leaver> v