Skip to content

Instantly share code, notes, and snippets.

View MaxSpacer's full-sized avatar
💭
I may be slow to respond.

Max Spacer MaxSpacer

💭
I may be slow to respond.
View GitHub Profile
@MaxSpacer
MaxSpacer / base_command.py
Created December 16, 2024 12:35 — forked from simion/base_command.py
Django management command - multiprocessing helper
import multiprocessing
from django.core.management import BaseCommand
def multiprocess_func(view_func):
""" Decoratior which closes database connection before running wrapped function.
Also unpacks args for multiprocessing module. """
def _decorator(args):
connection.close()
@MaxSpacer
MaxSpacer / gpg-ssh-setup.md
Created May 18, 2023 17:05 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.