Skip to content

Instantly share code, notes, and snippets.

@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active January 23, 2025 22:06
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.

@WillianTomaz
WillianTomaz / wsl-info.md
Last active January 23, 2025 22:06
Instruções do WSL (Instalação, Backup e Restauração)

LinkedIn

Instruções para Instalação, Backup e Restauração do WSL 2

  • Observação:

    • Sempre buscar pela documentação oficial, este documento é um tutorial
      que pode não te atender conforme tenha novas atualizações do processo de instalação.
    • As referências estão no final do documento.
  • Foi utilizado:

^(?'xmlDecl'<\?xml(?'versionInfo'([\u0020\u0009\u000d\u000a]+)version(?'eq'([\u0
020\u0009\u000d\u000a]+)?=([\u0020\u0009\u000d\u000a]+)?)('1\.[0-9]+'|"1\.[0-9]+
"))(?'encodingDecl'([\u0020\u0009\u000d\u000a]+)encoding(?'eq'([\u0020\u0009\u00
0d\u000a]+)?=([\u0020\u0009\u000d\u000a]+)?)("(?'encName'[A-Za-z][A-Za-z0-9._-]*
)"|'(?'encName'[A-Za-z][A-Za-z0-9._-]*)'))?(?'sddecl'([\u0020\u0009\u000d\u000a]
+)standalone(?'eq'([\u0020\u0009\u000d\u000a]+)?=([\u0020\u0009\u000d\u000a]+)?)
("(yes|no)"|'(yes|no)'))?([\u0020\u0009\u000d\u000a]+)?\?>)?(?'misc'(?'comment'<
!--((?!--)([\u0009\u000a\u000d\u0020-\ud7ff\ue000-\ufffd]|([\ud800-\udbff][\udc0
0-\udfff])))*-->)|(?'PI'<\?(?'pitarget'(?![xX][mM][lL])(?'name'([:A-Z_a-z\u00C0-
\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u
@imaurer
imaurer / gpush.sh
Last active January 23, 2025 22:03
Script to sync git repo and push with LLM-drafted git message
#!/bin/bash
#
# gpush: Lazy git add, commit, and push with comments written by LLM
#
#
# This script provides an enhanced git push workflow with the following features:
# - Automatically pulls latest changes from the current branch
# - Checks for uncommitted changes
# - Generates commit messages using AI (LLM/Gemini) if no message is provided
# - Allows interactive editing of auto-generated commit messages
@syncip
syncip / ntfy.yaml
Created January 5, 2024 15:52
ntfy crowdsec notification example
# /etc/crowdsec/notifications/ntfy.yaml
type: http # Don't change
name: ntfy # Must match the registered plugin in the profile
# One of "trace", "debug", "info", "warn", "error", "off"
log_level: trace
# group_wait: # Time to wait collecting alerts before relaying a message to this plugin, eg "30s"
# group_threshold: # Amount of alerts that triggers a message before <group_wait> has expired, eg "10"
@yrro
yrro / backup.py
Last active January 23, 2025 22:01
Orchestrate backups via borgbackup
#!/usr/bin/python3
# Usage: 'backup' alone will back the system up
# 'backup ARGS' will run borg with ARGS, configuring repository location, passphrase etc.
# e.g., 'backup list ::' will list backups in the repository
# Goals: run on RHEL 8's default Python interpreter (3.6) with no non-RHEL packages required
# Non-goals: backing up multiple filesystems, any configurability save modifying values set
# in code.
@theopolisme
theopolisme / studyisland.user.js
Last active January 23, 2025 21:51
Study Island Bot -- Automatically answer questions on Study Island * for demonstration purposes only *
// ==UserScript==
// @name Study Island Bot
// @description Automatically answer questions on Study Island
// @include http://*.studyisland.com/cfw/test/options*
// @include http://*.studyisland.com/cfw/test/practice-session*
// @grant none
// @namespace http://github.com/theopolisme
// @license MIT License
// @version 1.01
// @released 2013-09-01
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active January 23, 2025 21:50
set -e, -u, -o, -x pipefail explanation
@frankchang0125
frankchang0125 / tableView_setContentOffset.swift
Created July 28, 2016 17:10
Scroll to the offset after reloading tableView
/* We call layoutIfNeeded() immediately after reloadData()
* to force table view to perform layout immediately
* This is required to let the setContentOffset() in dispatch block to be executed
* after table view has completed performing its layout to scroll to the correct offset
* For further explanations, please see: http://goo.gl/BpzlA5 and http://goo.gl/6CH64b
*/
self.tableView.reloadData()
self.tableView.layoutIfNeeded()
dispatch_async(dispatch_get_main_queue(), {
@scyto
scyto / proxmox.md
Last active January 23, 2025 21:48
my proxmox cluster

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project