Skip to content

Instantly share code, notes, and snippets.

@sivel
sivel / better-ssh-authorized-keys-management.md
Last active April 10, 2025 03:40
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@haosdent
haosdent / x_layout.keylayout
Last active February 11, 2025 09:07
Mac OS X Keyboard layout file, works in 10.11
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--
Data generated Wed Mar 23 01:35:41 2022
Generated by kluchrtoxml_64 build 203
-->
<!--Last edited by Ukelele version 351 on 2022-03-23 at 01:45 (GMT+8)-->
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 9, 2025 12:22
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@brombres
brombres / AutoscaleRichTextLabel.gd
Created August 5, 2023 13:15
A Godot script to auto-scale the text of a RichTextLabel node as the RTL size changes.
# AutoscaleRichTextLabel.gd
#
# ABOUT
# 2023.08.04 by Brom Bresenham
# Tested on Godot 4.2-dev2
#
# USAGE
# 1. [Inspector] Create a RichTextLabel node and attach this script to it.
# 2. [Editor] Save and reload the scene to activate this as a @tool script
# that will automatically set the Node Reference Height.