Skip to content

Instantly share code, notes, and snippets.

@samveen
samveen / GNUPG_agent_forwarding.md
Last active August 26, 2024 05:35 — forked from TimJDFletcher/GNUPG_agent_forwarding.md
GnuPG agent forwarding

Forward GnuPG agent from key-host to signing-host

On the signing host

Run gpg once as your to create the directory structure

gpg --list-keys

For headless systemd based hosts

@samveen
samveen / pi-dist-upgrade.sh
Last active March 12, 2024 14:57 — forked from jauderho/gist:6b7d42030e264a135450ecc0ba521bd8
HOWTO: Upgrade Raspberry Pi OS from bullseye to bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
# Make sure everything is up-to-date
sudo apt update && sudo apt -y dist-upgrade && sudo apt -y autoremove && sudo apt -y clean
# Reboot once to ensure the running state uses the latest of everything.
sudo reboot
@samveen
samveen / [email protected]
Created June 13, 2023 11:25 — forked from afk-mario/[email protected]
Django + Gunicorn + VirtualEnv + Systemd
[Unit]
Description=Gunicorn for project %I
After=network.target
After=syslog.target
[Service]
EnvironmentFile=/etc/conf.d/django_%i
ExecStart=/usr/bin/start_gunicorn
Restart=always
SyslogIdentifier=gunicorn%I
@samveen
samveen / uping.py
Last active March 2, 2023 07:38 — forked from mdrisser/uping.py
µPing: Ping library for MicroPython
# µPing (MicroPing) for MicroPython
# copyright (c) 2018 Shawwwn <[email protected]>
# License: MIT
# Internet Checksum Algorithm
# Author: Olav Morken
# https://github.com/olavmrk/python-ping/blob/master/ping.py
# Fork of original code: Added average response time and fixed issue with urandom.randint() not working
# Author: Mike Risser
@samveen
samveen / [email protected]
Last active January 12, 2022 06:10 — forked from thomasjsn/laravel-queue.service
Laravel queue worker unit template for systemd.
# Laravel systemd queue worker unit template
# ----------------------------------
#
# /etc/systemd/system/[email protected]
# Config at /etc/laravel-queue-${INSTANCE}.conf
#
# To enable an instance of this service:
# - Create a conf file /etc/-laravel-queue-SOME_NAME.conf which contains:
# - LARAVEL_USER= (required)
# - LARAVEL_GROUP= (required)
@samveen
samveen / Dumper.py
Last active October 7, 2016 06:15 — forked from karelin/Dumper.py
A Perl Dumper clone for python
# -*- coding: utf-8 -*-
"""
A perl Data.Dumper clone for Python
Author: [email protected]
2011-07-08
"""
#!/bin/env python
import sys
from types import *