Skip to content

Instantly share code, notes, and snippets.

View Yaulendil's full-sized avatar

Yaulendil

  • Single
  • Michigan
View GitHub Profile
@ageis
ageis / systemd_service_hardening.md
Last active July 19, 2024 22:23
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active July 5, 2024 09:20
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@ShyamaSankar
ShyamaSankar / python_sets.py
Last active August 23, 2023 13:33
A cheat sheet for Python sets.
# Create an empty set using the constructor method.
numbers = set()
print(numbers) # Output: set()
# Note: {} creates a dictionary in Python.
print(type({})) # Output: <class 'dict'>
# set() constructor function takes an iterable as input.
numbers = set([1, 2])
print(numbers) # Output: {1, 2}
string_set = set("hello")