Skip to content

Instantly share code, notes, and snippets.

Forward GnuPG agent from macOS to Linux

On the remote machine

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 / django@.service
Created June 13, 2023 11:25 — forked from afk-mario/django@.service
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 <shawwwn1@gmail.com>
# 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 / laravel-queue@.service
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/laravel-queue@.service
# 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: simon@log4think.com
2011-07-08
"""
#!/bin/env python
import sys
from types import *