Skip to content

Instantly share code, notes, and snippets.

View pjosuah's full-sized avatar

josuah pjosuah

View GitHub Profile
@omltcat
omltcat / caddy_labels.md
Last active December 28, 2025 00:00
Caddy with Docker Labels: Easy config for wildcard certs and Authelia

What is this?

One great feature of caddy-docker-proxy is that you can quickly define config rules with Docker Compose labels in each containers on the fly like Traefik, instead of at a centralized place. With this feature, we can define everything in compose files, and don't ever need to mess with a config file (Caddyfile or JSON).

Taking advantage of snippets, I created this docker-compose.yaml example so that you can quickly define routing rules and add authetication like Authelia with just 3 lines of labels below each docker container you use.

With this example, should not ever need to manually edit Caddyfile config.

When you add a new container, you just need to do this:

networks:
@the-snesler
the-snesler / !CaddyDockerProxyExample.md
Last active May 1, 2025 12:00
CaddyDockerProxy Authelia example

Folder structure:

/services
  /authelia
    docker-compose_authelia.yml # (Includes example service with auth)
  /caddy
    docker-compose_caddy.yml
    Dockerfile # Needed to add the CaddyDockerProxy extension
    Caddyfile # Needed to contain common configuration
@loftwah
loftwah / theme.md
Last active September 7, 2024 15:25
Theme any application using nothing but Docker-Compose

Theming applications with Docker-Compose

I am pretty lazy and had to work out how I could change some files in relation to themeing a self-hosted application. Instead of adding to the codebase of the application, I decided to use Docker-Compose to mount the changes I make to the path of where they would be in the application already. This allows me to change what I like, and still be able to update and maintain the application the way I would without any changes to the codebase itself.

version: '3.3'

networks:
  net:
    driver: bridge
@qdm12
qdm12 / README.md
Last active December 23, 2025 08:46
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

@devnoname120
devnoname120 / My macOS setup.md
Last active December 25, 2025 17:56
My macOS setup

ℹ️ Enable iCloud end-to-end encryption:

  • Nobody knows that, but iCloud actually supports end-to-end encryption (see “Advanced Data Protection for iCloud”) but it’s disabled by default. If you care about data privacy, you should turn it on.
    • System settingsApple IDiCloud → Set Advanced Data Protection to On.
    • System settingsApple IDiCloud → Disable Access iCloud Data on the Web.
  • It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.

Table of Contents

@qdm12
qdm12 / readme.md
Last active August 25, 2025 06:36
Wireguard setup for Ubuntu server with LAN access

Wireguard setup for LAN access

Assumptions

  • The network 192.168.1.0/24 is your LAN
  • Your Ubuntu server is on your LAN at 192.168.1.10, through the network interface eth0
  • The network 192.168.5.0/24 is non existent
  • Your LAN DNS is at 192.168.1.1
@vibegui
vibegui / compress-pdf-with-gs.md
Created August 30, 2013 14:39
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.