27 Novmber meeting agenda. and miscellaneous kubernetes homepage junk.

This commit is contained in:
2025-11-26 09:41:36 +10:00
parent bdebd226fb
commit f722f7388c
8 changed files with 640 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
1. 6.30 pm - Welcome
2. 6.35 pm - Agreement on Agenda Items
1. 6.40 pm - Administrivia (if any)
1. 6.45 pm - Presentation 1 - Solar in your Home Assistant - @Belfry
2. 7.15 pm - Presentation 2 - Loose ends i vLANs and DNS
3. 7.45 pm - Recent (Discourse) Threads
1. Proposed
1. Managed switches
2. Auto Wireless Adapters
3. LLMs / MCPs
4. Ntfy
4. 8.15 pm - Next meeting - online on 9 December.
5. 8.30 pm - Close

View File

@@ -10,7 +10,7 @@
{
"coordinates": "-27.38621539644283,153.0351689206467",
"start": "2025-11-27T19:00",
"end": "2025-08-21T21:30",
"end": "2025-11-27T21:30",
"title": "November 2025 In Person Catch Up",
"description": "Monthly In Person Get Together. The PIN number for the meeting room is 452400.",
"location": "Chermside Library"
@@ -101,4 +101,4 @@
"description": "Getting started with meshtastic",
"location": "Jitsi"
}
]
]

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,154 @@
apiVersion: v1
data:
composer.json: |
{
"require": {
"michelf/php-markdown": "^2.0"
}
}
composer.lock: |
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1aaa1fd00dca33a7556a8414d72d72c3",
"packages": [
{
"name": "michelf/php-markdown",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
"reference": "eb176f173fbac58a045aff78e55f833264b34e71"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/eb176f173fbac58a045aff78e55f833264b34e71",
"reference": "eb176f173fbac58a045aff78e55f833264b34e71",
"shasum": ""
},
"require": {
"php": ">=7.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": ">=1.0",
"phpstan/phpstan-phpunit": ">=1.0",
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Michelf\\": "Michelf/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
}
],
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"markdown"
],
"support": {
"issues": "https://github.com/michelf/php-markdown/issues",
"source": "https://github.com/michelf/php-markdown/tree/2.0.0"
},
"time": "2022-09-26T12:21:08+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {},
"platform-dev": {},
"plugin-api-version": "2.6.0"
}
main.php: |
<?php
ini_set('memory_limit', '512M');
function getEvents() {
$content = file_get_contents("dat/events.json");
$entries = json_decode($content, $associative = true);
for ( $i = 0; $i < count($entries); $i++ ) {
$entry = $entries[$i];
$dt = new DateTime( $entry["start"] );
$ctl = $dt -> format("YmdHi");
$entries[$i]["ctl"] = $ctl;
$start = new DateTime($entries[$i]["start"]);
$end = new DateTime($entries[$i]["end"]);
$delta = $start->diff($end);
$hours = $delta -> days * 24 + $delta -> h + $delta -> i / 60 + $delta -> s / 3600;
$entries[$i]["hours"] = $hours;
$datestamp = $dt -> format("Ymd");
$files = array( "agenda" => sprintf("dat/agenda/%d.md", $datestamp)
, "minutes" => sprintf("dat/minutes/%d.md", $datestamp)
);
foreach ( $files as $key => $file ) {
if ( file_exists( $file ) ) {
$entries[$i][$key] = file_get_contents($file);
}
}
}
usort($entries, function ($a, $b) {
$dateA = new DateTime($a['start']);
$dateB = new DateTime($b['start']);
return $dateA < $dateB ? 1 : -1;
});
return($entries);
}
function putEvents($events) {
for ( $i = 0; $i < count($events); $i++ ) {
$entry = $events[$i];
$dt = new DateTime( $entry["start"] );
$start = new DateTime($entry["start"]);
$datestamp = $dt -> format("Ymd");
$files = array( "agenda" => sprintf("dat/agenda/%d.md", $datestamp)
, "minutes" => sprintf("dat/minutes/%d.md", $datestamp)
);
foreach ( $files as $key => $path ) {
if ( in_array($key, array_keys($entry)) ) {
$fout = fopen($path, "wt");
fwrite($fout, $entry[$key]);
fclose($fout);
} else {
if ( file_exists($path) ) {
unlink($path);
}
}
}
foreach ( array( "ctl", "hours", "agenda", "minutes" ) as $field ) {
unset($events[$i][$field]);
}
}
$json = json_encode($events, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
file_put_contents("dat/events.json", $json);
}
?>
kind: ConfigMap
metadata:
labels:
io.kompose.service: app-homepage
name: app-homepage-cm1

View File

@@ -0,0 +1,18 @@
apiVersion: v1
data:
entrypoint.sh: |+
#!/bin/bash
set -e
echo "Custom entrypoint.sh: `hostname -s`!"
chmod -Rfv ugo+w /var/www/html/dat
exec docker-php-entrypoint apache2-foreground
kind: ConfigMap
metadata:
annotations:
use-subpath: "true"
labels:
io.kompose.service: app-homepage
name: app-homepage-cm3

View File

@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f ../docker-compose.yaml
kompose.version: 1.37.0 (fb0539e64)
labels:
io.kompose.service: app-homepage
name: app-homepage
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: app-homepage
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f ../docker-compose.yaml
kompose.version: 1.37.0 (fb0539e64)
labels:
io.kompose.service: app-homepage
spec:
containers:
- command:
- bash
- /entrypoint.sh
image: php:8.2-apache
name: app-homepage
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/www/html
name: app-homepage-cm0
- mountPath: /var/www/html/lib
name: app-homepage-cm1
- mountPath: /entrypoint.sh
name: app-homepage-cm3
subPath: entrypoint.sh
- mountPath: /var/www/html/dat
name: app-homepage-pvc
hostname: app-homepage
restartPolicy: Always
volumes:
- configMap:
name: app-homepage-cm0
name: app-homepage-cm0
- configMap:
name: app-homepage-cm1
name: app-homepage-cm1
- configMap:
items:
- key: entrypoint.sh
path: entrypoint.sh
name: app-homepage-cm3
name: app-homepage-cm3
- name: app-homepage-pvc
persistentVolumeClaim:
claimName: app-homepage-pvc

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f ../docker-compose.yaml
kompose.version: 1.37.0 (fb0539e64)
labels:
io.kompose.service: app-homepage
name: app-homepage
spec:
ports:
- name: "8080"
port: 8080
targetPort: 80
selector:
io.kompose.service: app-homepage

11
kubernetes/nvs-pvc.yaml Normal file
View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: app-homepage-pvc
spec:
accessModes:
- ReadWriteMany
storageClassName: nfs-csi
resources:
requests:
storage: 2Gi