website

Unnamed repository; edit this file 'description' to name the repository.
git clone https://codeberg.org/emmett1/website
Log | Files | Refs | README | LICENSE

commit 870aef1af9bf6d144378595c528c2fcda15e9a6c
parent d40f3fb8dd8862b4cce7ae423b0714121a901dec
Author: emmett1 <emmett1.2miligrams@protonmail.com>
Date:   Tue, 23 Sep 2025 00:30:17 +0800

updated

Diffstat:
Mindex.sh | 23++++++++++++++++++++---
Auses.txt | 26++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/index.sh b/index.sh @@ -17,7 +17,7 @@ humansize() { genhtml() { OUTPUT="index.html" - title=$([ -f about.txt ] && echo home || echo ${PWD##*/}) + title=$([ "$subdir" ] && echo /home/${PWD##*/} || echo /home) { echo "<!DOCTYPE html>" @@ -25,7 +25,7 @@ genhtml() { echo "<head>" echo " <meta charset=\"UTF-8\">" echo " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">" - echo " <title>$title | emmett1.my</title>" + echo " <title>${title##*/} | emmett1.my</title>" echo " <link rel=\"icon\" href=\"/assets/pixelfox.png\" type=\"image/png\">" echo " <style> body { font-family: monospace; background: #1e1e1e; color: #e0e0e0; margin: 0; padding: 1em; max-width: 60em; margin-left: auto; margin-right: auto; font-size: 14px; } @@ -57,6 +57,10 @@ genhtml() { echo "<table>" echo "<thead><tr><th class=\"name\">name</th><th class=\"meta\">last modified & size</th></tr></thead>" echo "<tbody>" + + if [ "$subdir" ]; then + echo "<tr><td class=\"name\"><a href=\"../\">../</a></td><td class=\"meta\"><span class=\"date\">-</span><span class=\"size\">-</span></td></tr>" + fi # List files for f in *; do @@ -69,6 +73,7 @@ genhtml() { [ "$f" = "LICENSE" ] && continue [ "$f" = "index.sh" ] && continue [ "$f" = "assets" ] && continue + [ "$f" = "images" ] && continue if [ -e "$f" ]; then mod=$(date -r "$f" +"%Y-%m-%d %H:%M") @@ -134,11 +139,22 @@ EOF line="<blockquote>${safe#&gt; }</blockquote>" fi - # Plain text (escape, inline code, URLs) + # Plain text (escape, inline code, URLs, bold, links) if ! echo "$line" | grep -qE '<(img|blockquote)'; then + # Escape text line=$(printf '%s' "$line" | sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g') + + # Inline code line=$(printf '%s' "$line" | sed -E 's/`([^`]+)`/<code>\1<\/code>/g') + + # Bold (**bold**) + line=$(printf '%s' "$line" | sed -E 's/\*\*([^*]+)\*\*/<b>\1<\/b>/g') + + # Auto-link raw URLs line=$(printf '%s' "$line" | sed -E 's#(https?://[^ ]+)#<a href="\1">\1</a>#g') + + # Markdown links [text](url) (no https://) + line=$(printf '%s' "$line" | sed -E 's/\[([^]]+)\]\(([^)]+)\)/<a href="\2">\1<\/a>/g') fi # Preserve empty lines @@ -178,6 +194,7 @@ EOF genhtml +subdir=1 for d in *; do [ -d "$d" ] || continue ( diff --git a/uses.txt b/uses.txt @@ -0,0 +1,26 @@ +what is use in my everyday developments. + +site +---- +- **VPS**: [contabo](contabo.com/en), running my own distro [Alice Linux](alicelinux.emmett1.my) +- **domain**: [shinjiru malaysia](www.shinjiru.com.my) +- **webhost**: [codeberg](codeberg.org), pulled on my VPS by cronjob every few minutes to serve the site +- **ssh client**: [dropbear](matt.ucc.asn.au/dropbear/dropbear.html) +- **web server**: [lighttpd](www.lighttpd.net) + +software +-------- +- **operating system**: [Alice Linux](alicelinux.emmett1.my) | [KRAK3N](kraken.my) | [CRUX](crux.nu) +- **window manager**: [sway](swaywm.org) +- **statusbar**: swaybar + [my script](codeberg.org/emmett1/dotfiles/src/branch/main/.config/sway/statusbar.sh) +- **terminal emulator**: [foot](codeberg.org/dnkl/foot) +- **shell**: busybox's ash +- **text editor**: busybox's vi | [geany](www.geany.org) +- **filebrowser**: cmd | [shfm](github.com/dylanaraps/shfm) +- **web browser**: [firefox](www.mozilla.org/firefox) | [librewolf](librewolf.net) +- **irc client**: [irssi](irssi.org) + +hardware +-------- +- **laptop**: ThinkPad X390 +- **phone**: Google Pixel 5, running [LineageOS for microG](lineage.microg.org/)