Skip to content

Instantly share code, notes, and snippets.

@fizzyade
fizzyade / untangle_letsencrypt.md
Last active January 22, 2022 02:10
Set Untangle certificate to an auto renewing LetsEncrypt certificate

This uses acme.sh to generate a certificate which replaces the one shown in the certificate section in the Untangle UI.

It updates on each run and if the certificate is renewed it replaces the one used by untangle and restarts apache.

if the certificate isn’t renewed, it still checks if the certificate untangle is using is the one cached by acme.sh and it will replace it and restart apache if necessary.

The crontab entries allow it to do a certificate check at reboot and also at 4am every morning.

You’ll need to download acme.sh, but it requires no extra dependencies over what is supplied in untangle, you will need to edit the acme.sh configuration file to match how you update the cert.

Both things have been introduced recently, and let you access even private ec2 instances

  1. Without VPN
  2. No open SSH port
  3. Authentication / Authorization is fully delegated to IAM
# Assumes valid AWS Credentials in ENV
@miped
miped / tmux-cheatsheet.markdown
Created February 6, 2022 17:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Desttro
Desttro / models.py
Last active March 11, 2022 02:22
django + strawberry
from django.db import models
class Post(models.Model):
title = models.CharField(max_length=128)
slug = models.SlugField(unique=True, editable=False)
content = models.TextField() # markdown
thumbnail = models.ImageField(upload_to='%Y/%m/%d/', width_field='width', height_field='height')
width = models.PositiveIntegerField(editable=False)
height = models.PositiveIntegerField(editable=False)