Skip to content

Instantly share code, notes, and snippets.

[Unit]
After=snap.certbot.renew.service
Wants=snap.certbot.renew.service
Description=Transform example.com cert into pkcs12 format
PartOf=snap.certbot.renew.service
[Service]
Type=oneshot
ExecStart=/usr/bin/openssl pkcs12 -export -out /home/user/config/certificate.p12 -inkey /etc/letsencrypt/live/example.com/privkey.pem -in /etc/letsencrypt/live/example.com/cert.pem -certfile /etc/letsencrypt/live/example.com/chain.pem -passout pass:
ExecStartPost=/bin/chown appuser:users /home/user/config/certificate.p12
@agates
agates / gist:9d25d2c59d12bbb014a04c55d7fd706b
Last active May 24, 2023 03:51
Adding Let's Encrypt certs to PeerTube plugin livechat under the default docker setup
# Open a shell in the certbot container
docker exec -it certbot /bin/sh
# Run cerbot
certbot certonly
# Enter the correct options for your domain and defaults to work with the PeerTube webserver container
# How would you like to authenticate with the ACME CA?
# Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
# Please enter the domain name(s) you would like on your certificate (comma and/or
@agates
agates / combined-lightning-streaming-metadata.json
Last active January 29, 2024 03:42
Proof of Concept bitcoin lightning TLV record with combined timestamps
{
"app_name": "Castamatic",
"app_version": "8.0.6",
"value_msat_total": 649480,
"url": "https://feeds.buzzsprout.com/1844352.rss",
"podcast": "Mere Mortals",
"action": "stream",
"episode": "The Art Of NFT's & Aimless Wandering",
"episode_guid": "Buzzsprout-9931017",
"tsIntervals": [
@agates
agates / exwalk.py
Created January 23, 2020 19:57
Wrapper around os.walk with directory/file exclusion
import fnmatch
import os
import re
def exwalk(path, exclude_dirs=(), exclude_files=(), onerror=None):
"""
Wrapper around os.walk to exclude files and directories using Unix shell-style wildcards with Python's fnmatch
"""
exclude_dirs_pattern = re.compile(
{
"version": 3,
"terraform_version": "0.8.4",
"serial": 12,
"lineage": "119bec8a-35c3-4f44-8bec-bb293b4bb630",
"modules": [
{
"path": [
"root"
],

Keybase proof

I hereby claim:

  • I am agates on github.
  • I am agates (https://keybase.io/agates) on keybase.
  • I have a public key whose fingerprint is 730A ED0C F86A 3E22 F2F4 6CE2 67D3 314E 26CA 0F78

To claim this, I am signing this object:

/**
* @author Thomas Burleson
* @date November, 2013
* @copyright 2013 Mindspace LLC.
* @web http://solutionOptimist.com
*
* @description
*
* Used within AngularJS to decorate/enhance the AngularJS `$q` service.
*