feat: remove matrix (#7)
All checks were successful
/ deploy (push) Successful in 44s

Reviewed-on: #7
This commit is contained in:
ange 2025-07-22 18:18:32 +00:00
parent 9420df0a4c
commit 1f0c0ba4b1
9 changed files with 39 additions and 54 deletions

1
README.md Normal file
View File

@ -0,0 +1 @@
# yw5n.com

View File

@ -1,3 +1,3 @@
termux.sh https://git.gmoker.com/ange/termux/raw/branch/main/install.sh
dotfiles.sh https://git.gmoker.com/ange/dotfiles
arch.sh https://git.gmoker.com/ange/arch
dotfiles https://git.gmoker.com/ange/dotfiles
arch https://git.gmoker.com/ange/arch

2
go.mod
View File

@ -1,3 +1,3 @@
module main
go 1.24.1
go 1.24

View File

@ -24,11 +24,6 @@
<div id="main">
<table>
<tr>
<td>Matrix (Element)</td>
<td id="matrix">{{template "matrix"}}</td>
<td><button onclick="copyElem('matrix')">Copy</button></td>
</tr>
<tr>
<td>Discord</td>
<td id="discord">{{template "discord"}}</td>

View File

@ -1,36 +1,35 @@
#!/bin/bash -e
set -o pipefail
function kapply() {
kapply() {
for f in "$@"; do
kubectl apply -f <(envsubst < "manifests/$f")
kubectl apply --server-side \
-f<(envsubst "$(env | sed 's/^/$/')" < "manifests/$f")
done
}; export -f kapply
function kcreatesec() {
kubectl create secret generic --dry-run=client -oyaml "$@" | kubectl replace -f-
kcreatesec() {
kubectl apply --server-side \
-f<(kubectl create secret generic --dry-run=client -oyaml "$@")
}; export -f kcreatesec
function kcreatecm() {
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl replace -f-
kcreatecm() {
kubectl apply --server-side \
-f<(kubectl create configmap --dry-run=client -oyaml "$@")
}; export -f kcreatecm
function kgseckey() {
kgseckey() {
local sec="$1"; shift
local key="$1"; shift
if ! kubectl get secret "$sec" -ojson | jq -re ".data.\"$key\" // empty" | base64 -d; then
return 1
fi
kubectl get secret "$sec" -ojson | jq -re ".data.\"$key\"" | base64 -d
}; export -f kgseckey
function kgcmkey() {
kgcmkey() {
local cm="$1"; shift
local key="$1"; shift
if ! kubectl get configmap "$cm" -ojson | jq -re ".data.\"$key\" // empty"; then
return 1
fi
kubectl get configmap "$cm" -ojson | jq -re ".data.\"$key\""
}; export -f kgcmkey

View File

@ -1,25 +0,0 @@
package main
import (
"log"
"os"
"strings"
)
var ALIASES map[string]string
func generateAliases() {
f, err := os.ReadFile("aliases.txt")
if err != nil {
log.Fatal(err)
}
ALIASES = make(map[string]string)
for l := range strings.SplitSeq(string(f), "\n") {
sp := strings.Fields(l)
if len(sp) == 2 {
ALIASES[sp[0]] = sp[1]
}
}
}

View File

@ -3,12 +3,31 @@ package main
import (
"bytes"
"html/template"
"log"
"os"
"path/filepath"
"regexp"
"strings"
)
var TMPL map[string][]byte
var ALIASES map[string]string
func generateAliases() {
f, err := os.ReadFile("aliases.txt")
if err != nil {
log.Fatal(err)
}
ALIASES = make(map[string]string)
for l := range strings.SplitSeq(string(f), "\n") {
sp := strings.Fields(l)
if len(sp) == 2 {
ALIASES[sp[0]] = sp[1]
}
}
}
var TMPL map[string][]byte
func generateTmpl() {
files, _ := filepath.Glob("html/*.html")
re := regexp.MustCompile("html/(.+).html")

2
ssh
View File

@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDUccdlgUHzV+AhWDyjwcG4QwSNbybIV8MF7c6XpKQl4
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDUccdlgUHzV+AhWDyjwcG4QwSNbybIV8MF7c6XpKQl4 ange@yw5n.com

View File

@ -1,7 +1,3 @@
{{define "matrix"}}
<a href="https://app.element.io/#/user/@ange:gmoker.com" target="_blank" rel="noreferrer noopener">@ange:gmoker.com</a>
{{end}}
{{define "discord"}}
@elrilio
{{end}}