Skip to content

Instantly share code, notes, and snippets.

@umbernhard
umbernhard / arch-secure-install.md
Last active August 5, 2025 12:27
Building a Secure Arch Linux Device

Building a Secure Arch Linux Device

Locking down a linux machine is getting easier by the day. Recent advancements in systemd-boot have enabled a host of features to help users ensure that their machines have not been tampered with. This guide provides a walkthrough of how to turn on many of these features during installation, as well as reasoning for why certain features help improve security.

The steps laid out below draw on a wide variety of existing resources, and in places I'll point to them rather than attempt to regurgitate full explanations of the various security components. The most significant one, which I highly encourage everyone to read, is Rod Smith's site about secure boot, which is the most comprehensive and cogent explanation of UEFI, boot managers and boot loaders, and secure boot. Another incredibly useful resources is Safeboot, which encapsulates many of the setup steps below in a Debian application.

@antoniofogaca
antoniofogaca / python.md
Last active August 5, 2025 12:26
Comandos Python

Cabeçalho nível 1 (maior)

Cabeçalho nível 2

Cabeçalho nível 6 (menor)
@Syderitic
Syderitic / Secure_Encrypted_Storage_Setup.md
Last active August 5, 2025 12:25
Secure Encrypted Storage Setup with LUKS2, TPM2, FIDO2, and Btrfs

Secure Encrypted Storage Setup with LUKS2, TPM2, FIDO2, and Btrfs

Disclaimer: Use this guide at your own discretion. The author is not responsible for any data loss or security breaches that may occur. Always ensure you understand each step and its implications before proceeding.

This guide walks you through setting up a secure external drive, perfect for backing up sensitive data, securely handing over large data sets, or storing important files. It covers creating an encrypted drive that’s easy to unlock with trusted devices, such as a security key, while remaining highly secure if misplaced. Ideal for safeguarding personal data or business files, it offers practical recovery steps to ensure access even if you change devices.

By following this guide, you will have established a secure and user-friendly encrypted storage solution that leverages:

  • LUKS2 Encryption: Provides robust disk encryption.
  • TPM2 Integration: Enables automatic unlocking on trusted hardware.
  • FIDO2 Tokens: Offers flexible acc
@rymawby
rymawby / stripe-credit-card-numbers.md
Last active August 5, 2025 12:25
Stripe test credit card numbers for use in development

Test credit card numbers to use when developing with Stripe

4242424242424242 Visa

4012888888881881 Visa

4000056655665556 Visa (debit)

@ljw1004
ljw1004 / you_are_not_right.sh
Last active August 5, 2025 12:18
A UserPromptSubmit hook for Claude Code to stop it saying "You're right"
#!/bin/bash
set -euo pipefail
trap 'echo "at line $LINENO, exit code $? from $BASH_COMMAND" >&2; exit 1' ERR
# This is a Claude Code hook to stop it saying "you are right".
#
# Installation:
# 1. Save this script and chmod +x it to make it executable.
# 2. Within Claude Code, /hooks / UserPromptSubmit > Add a new hook (this file)
#
@mazzy89
mazzy89 / sensor.py
Created May 27, 2024 13:42
Gtfs real time PID
import datetime
import logging
import requests
import time
from enum import Enum
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (CONF_NAME, ATTR_LONGITUDE, ATTR_LATITUDE)
@CodeMyUI
CodeMyUI / index.html
Last active August 5, 2025 12:17
Social
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@1,600&display=swap" rel="stylesheet">
<div class='social-links'>
<div class='social-btn flex-center' id="twitter">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"/></svg><span>@SquiresChance</span>
</div>
<div class='social-btn flex-center' id="linkedin">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.98 3.5c0 1.381-1.11 2.5-2.48

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@brandshore
brandshore / gist:ce244b801e3668758a0e189cddc30491
Created August 5, 2025 09:09
Schema-generation-blueprint
# Schema Generation Playbook
## Overview
This playbook provides a systematic approach to generating comprehensive, production-ready schemas for any domain. It combines domain expertise, automated research, and validation to ensure high-quality results.
## Core Principles
### 1. Domain-First Approach
- **Always start with domain analysis** - Understand the specific requirements and patterns
- **Research before generating** - Use MCP tools to gather relevant information
@abul4fia
abul4fia / ligth_theme.py
Last active August 5, 2025 12:15
Light theme for manim
# Put this file in the same folder than your manim script
# and start your script with:
#
# import light_theme
from manim import *
config.background_color = WHITE
# Those are objects which are WHITE by default