Skip to content

Instantly share code, notes, and snippets.

View bartsmit's full-sized avatar

Bart J. Smit bartsmit

View GitHub Profile
@bartsmit
bartsmit / gist:9d7323ad2ff3d7a7afa98421e1e501f2
Last active October 21, 2024 12:14
Portainer, NPM with Mythic Beasts Let's Encrypt certificate
Docker setup
------------
Start with a Docker host. Raspberry Pi, Mac, Linux, Windows WSL, etc. In this example it is Ubuntu 24.04 LXC on Proxmox.
Portainer recommends the official docker binary rather than the distro version, so don't select docker in the optional extras.
Set a static IP for the host with the OS provided tools.
Fully patch the OS and (likely) reboot.
https://docs.docker.com/engine/install/ for Ubuntu says to:
@bartsmit
bartsmit / gist:74c45e1f0fde479e62ba87043f69bbdb
Last active February 8, 2024 19:55
Tailscale sidecar containers for Portainer
On your Docker host, create directories for the worker containers (Memos and Snapdrop in this gist)
mkdir memos && chmod 777 memos
mkdir tailmemo && chmod 777 tailmemo
mkdir tailsnap && chmod 777 tailsnap
mkdir tailshare && chmoe 777 tailshare
On the Tailscale admin console, select Access controls and add:
"tagOwners": {
"tag:container": ["autogroup:admin"],
},
@bartsmit
bartsmit / index.php
Created May 1, 2020 11:47
Asterisk phone book in PHP
<html><head><title>Phonebook</title>
<style>
table, th, td {
padding: 10px;
border: 1px solid black;
border-collapse: collapse;
width:40%
}
</style>
</head>
@bartsmit
bartsmit / gswqr.pl
Last active April 22, 2020 13:14
Create QR codes to enroll GrandStream Wave Softphones into a PBX.
#!/usr/bin/perl
use Term::ReadKey;
use strict;
# Server specific values
my $pbx = "pbx.fqdn.or.ip.address";
my $act = "NameOfTheAccountInApp";
print "\nExtension : ";