diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-19 16:29:50 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-19 16:29:50 +0300 |
| commit | 236ea2357557d10d8b6084d0bb8d059d85408f26 (patch) | |
| tree | 9f4e456f94ddbb09c85181d7f8e534a0a04430ed /about/showcase.md | |
| parent | 1feb8d53ddc108d994e05af9db06c4b9afbfbd5b (diff) | |
Update content for md
Diffstat (limited to 'about/showcase.md')
| -rw-r--r-- | about/showcase.md | 1190 |
1 files changed, 660 insertions, 530 deletions
diff --git a/about/showcase.md b/about/showcase.md index 42a659d1..0926951f 100644 --- a/about/showcase.md +++ b/about/showcase.md @@ -1,6 +1,6 @@ # Project Showcase -Generated on: 2025-07-12 +Generated on: 2025-07-19 This page showcases my side projects, providing an overview of what each project does, its technical implementation, and key metrics. Each project summary includes information about the programming languages used, development activity, and licensing. The projects are ordered by recent activity, with the most actively maintained projects listed first. @@ -9,10 +9,12 @@ This page showcases my side projects, providing an overview of what each project * [⇢ Project Showcase](#project-showcase) * [⇢ ⇢ Overall Statistics](#overall-statistics) * [⇢ ⇢ Projects](#projects) +* [⇢ ⇢ ⇢ totalrecall](#totalrecall) * [⇢ ⇢ ⇢ gitsyncer](#gitsyncer) +* [⇢ ⇢ ⇢ dtail](#dtail) +* [⇢ ⇢ ⇢ rexfiles](#rexfiles) * [⇢ ⇢ ⇢ timr](#timr) * [⇢ ⇢ ⇢ tasksamurai](#tasksamurai) -* [⇢ ⇢ ⇢ rexfiles](#rexfiles) * [⇢ ⇢ ⇢ ior](#ior) * [⇢ ⇢ ⇢ wireguardmeshgenerator](#wireguardmeshgenerator) * [⇢ ⇢ ⇢ ds-sim](#ds-sim) @@ -20,7 +22,6 @@ This page showcases my side projects, providing an overview of what each project * [⇢ ⇢ ⇢ gos](#gos) * [⇢ ⇢ ⇢ foostats](#foostats) * [⇢ ⇢ ⇢ rcm](#rcm) -* [⇢ ⇢ ⇢ gemtexter](#gemtexter) * [⇢ ⇢ ⇢ quicklogger](#quicklogger) * [⇢ ⇢ ⇢ docker-gpodder-sync-server](#docker-gpodder-sync-server) * [⇢ ⇢ ⇢ terraform](#terraform) @@ -30,7 +31,7 @@ This page showcases my side projects, providing an overview of what each project * [⇢ ⇢ ⇢ gorum](#gorum) * [⇢ ⇢ ⇢ guprecords](#guprecords) * [⇢ ⇢ ⇢ randomjournalpage](#randomjournalpage) -* [⇢ ⇢ ⇢ dtail](#dtail) +* [⇢ ⇢ ⇢ gemtexter](#gemtexter) * [⇢ ⇢ ⇢ sway-autorotate](#sway-autorotate) * [⇢ ⇢ ⇢ photoalbum](#photoalbum) * [⇢ ⇢ ⇢ algorithms](#algorithms) @@ -50,46 +51,98 @@ This page showcases my side projects, providing an overview of what each project * [⇢ ⇢ ⇢ template](#template) * [⇢ ⇢ ⇢ muttdelay](#muttdelay) * [⇢ ⇢ ⇢ netdiff](#netdiff) -* [⇢ ⇢ ⇢ pwgrep](#pwgrep) * [⇢ ⇢ ⇢ japi](#japi) * [⇢ ⇢ ⇢ perl-poetry](#perl-poetry) * [⇢ ⇢ ⇢ ipv6test](#ipv6test) -* [⇢ ⇢ ⇢ loadbars](#loadbars) * [⇢ ⇢ ⇢ cpuinfo](#cpuinfo) +* [⇢ ⇢ ⇢ loadbars](#loadbars) +* [⇢ ⇢ ⇢ pwgrep](#pwgrep) * [⇢ ⇢ ⇢ perldaemon](#perldaemon) * [⇢ ⇢ ⇢ awksite](#awksite) * [⇢ ⇢ ⇢ jsmstrade](#jsmstrade) -* [⇢ ⇢ ⇢ netcalendar](#netcalendar) * [⇢ ⇢ ⇢ ychat](#ychat) +* [⇢ ⇢ ⇢ netcalendar](#netcalendar) * [⇢ ⇢ ⇢ hsbot](#hsbot) -* [⇢ ⇢ ⇢ fype](#fype) * [⇢ ⇢ ⇢ vs-sim](#vs-sim) +* [⇢ ⇢ ⇢ fype](#fype) ## Overall Statistics -* 📦 Total Projects: 55 -* 📊 Total Commits: 10,446 -* 📈 Total Lines of Code: 211,600 -* 📄 Total Lines of Documentation: 21,802 -* 💻 Languages: Go (20.2%), Java (19.1%), C++ (17.6%), C/C++ (9.9%), Perl (8.1%), C (7.1%), Shell (6.9%), Config (2.2%), HTML (2.1%), Ruby (1.3%), HCL (1.3%), Make (0.9%), Python (0.8%), CSS (0.7%), Raku (0.6%), JSON (0.4%), XML (0.3%), Haskell (0.3%), YAML (0.2%), TOML (0.1%) -* 📚 Documentation: Text (52.5%), Markdown (45.2%), LaTeX (2.3%) -* 🎵 Vibe-Coded Projects: 2 out of 55 (3.6%) -* 🤖 AI-Assisted Projects (including vibe-coded): 7 out of 55 (12.7% AI-assisted, 87.3% human-only) -* 🚀 Release Status: 33 released, 22 experimental (60.0% with releases, 40.0% experimental) +* 📦 Total Projects: 56 +* 📊 Total Commits: 10,528 +* 📈 Total Lines of Code: 202,691 +* 📄 Total Lines of Documentation: 236,370 +* 💻 Languages: Go (31.4%), Java (20.0%), C (9.5%), C++ (8.7%), Perl (7.9%), Shell (6.4%), C/C++ (6.0%), HTML (1.8%), Config (1.8%), Ruby (1.4%), HCL (1.4%), Python (0.8%), Make (0.8%), Raku (0.4%), JSON (0.4%), CSS (0.4%), XML (0.3%), Haskell (0.3%), YAML (0.2%), TOML (0.1%) +* 📚 Documentation: Text (94.3%), Markdown (5.5%), LaTeX (0.2%) +* 🎵 Vibe-Coded Projects: 3 out of 56 (5.4%) +* 🤖 AI-Assisted Projects (including vibe-coded): 8 out of 56 (14.3% AI-assisted, 85.7% human-only) +* 🚀 Release Status: 34 released, 22 experimental (60.7% with releases, 39.3% experimental) ## Projects +### totalrecall + +* 💻 Languages: Go (99.8%), YAML (0.2%) +* 📚 Documentation: Markdown (92.7%), Text (7.3%) +* 📊 Commits: 42 +* 📈 Lines of Code: 7418 +* 📄 Lines of Documentation: 438 +* 📅 Development Period: 2025-07-14 to 2025-07-19 +* 🔥 Recent Activity: 2.0 days (avg. age of last 42 commits) +* ⚖️ License: MIT +* 🏷️ Latest Release: v0.5.0 (2025-07-19) +* 🎵 Vibe-Coded: This project has been vibe coded + + +**totalrecall** is a Bulgarian language learning tool that generates comprehensive Anki flashcard materials from Bulgarian words. It creates high-quality audio pronunciations using OpenAI TTS, AI-generated contextual images via DALL-E, and automatic translations, making it easier for learners to memorize Bulgarian vocabulary through visual and auditory associations. The tool is particularly useful for language learners who want to create professional-quality flashcards with authentic Bulgarian pronunciation and memorable visual contexts without manually sourcing audio and images. + +The project is implemented in Go with a modular architecture featuring both CLI and GUI interfaces. It leverages OpenAI's APIs for audio generation (11 available voices) and image creation, includes audio caching to minimize API costs, and supports batch processing from text files. The tool outputs Anki-compatible packages (.apkg format) or CSV files with all media included, following a clean package structure with separate modules for audio generation, image processing, Anki formatting, and configuration management using industry-standard libraries like Cobra for CLI and Viper for configuration. + +[View on Codeberg](https://codeberg.org/snonux/totalrecall) +[View on GitHub](https://github.com/snonux/totalrecall) + +Go from `internal/gui/generator.go`: + +```AUTO +func (a *Application) saveAudioAttribution(word, audioFile, voice string, speed + float64) error { + attribution := fmt.Sprintf("Audio generated by OpenAI TTS\n\n") + attribution += fmt.Sprintf("Bulgarian word: %s\n", word) + attribution += fmt.Sprintf("Model: %s\n", a.audioConfig.OpenAIModel) + attribution += fmt.Sprintf("Voice: %s\n", voice) + attribution += fmt.Sprintf("Speed: %.2f\n", speed) + + if a.audioConfig.OpenAIInstruction != "" { + attribution += fmt.Sprintf("\nVoice instructions:\n%s\n", + a.audioConfig.OpenAIInstruction) + } + + attribution += fmt.Sprintf("\nGenerated at: %s\n", time.Now().Format( + "2006-01-02 15:04:05")) + + attrPath := strings.TrimSuffix(audioFile, filepath.Ext(audioFile)) + + "_attribution.txt" + if err := os.WriteFile(attrPath, []byte(attribution), 0644); err != nil { + return fmt.Errorf("failed to write audio attribution file: %w", err) + } + + return nil +} +``` + +--- + ### gitsyncer -* 💻 Languages: Go (89.5%), Shell (8.9%), YAML (1.1%), JSON (0.4%) +* 💻 Languages: Go (90.3%), Shell (8.3%), YAML (1.0%), JSON (0.4%) * 📚 Documentation: Markdown (100.0%) -* 📊 Commits: 76 -* 📈 Lines of Code: 8340 -* 📄 Lines of Documentation: 2363 -* 📅 Development Period: 2025-06-23 to 2025-07-12 -* 🔥 Recent Activity: 2.5 days (avg. age of last 42 commits) +* 📊 Commits: 88 +* 📈 Lines of Code: 8976 +* 📄 Lines of Documentation: 2475 +* 📅 Development Period: 2025-06-23 to 2025-07-13 +* 🔥 Recent Activity: 7.9 days (avg. age of last 42 commits) * ⚖️ License: BSD-2-Clause -* 🏷️ Latest Release: v0.5.0 (2025-07-09) +* 🏷️ Latest Release: v0.7.2 (2025-07-13) * 🎵 Vibe-Coded: This project has been vibe coded @@ -100,14 +153,97 @@ The tool is implemented in Go with a clean architecture that supports both indiv [View on Codeberg](https://codeberg.org/snonux/gitsyncer) [View on GitHub](https://github.com/snonux/gitsyncer) -Go from `internal/showcase/images.go`: +Go from `internal/showcase/showcase.go`: + +```AUTO +func New(cfg *config.Config, workDir string) *Generator { + return &Generator{ + config: cfg, + workDir: workDir, + } +} +``` + +--- + +### dtail + +* 💻 Languages: Go (91.0%), Shell (4.1%), JSON (2.1%), C (1.4%), Make (0.9%), C/C++ (0.2%), Config (0.1%) +* 📚 Documentation: Text (98.3%), Markdown (1.7%) +* 📊 Commits: 1049 +* 📈 Lines of Code: 27726 +* 📄 Lines of Documentation: 220214 +* 📅 Development Period: 2020-01-09 to 2025-07-04 +* 🔥 Recent Activity: 17.0 days (avg. age of last 42 commits) +* ⚖️ License: Apache-2.0 +* 🏷️ Latest Release: v4.2.0 (2023-06-21) +* 🤖 AI-Assisted: This project was partially created with the help of generative AI + + +[](showcase/dtail/image-1.png) + +DTail is a distributed log processing system written in Go that allows DevOps engineers to tail, cat, and grep log files across thousands of servers concurrently. It provides secure access through SSH authentication and respects UNIX file system permissions, making it ideal for enterprise environments where log analysis needs to scale horizontally across large server fleets. The tool supports advanced features like compressed file handling (gzip/zstd) and distributed MapReduce aggregations for complex log analytics. + +[](showcase/dtail/image-2.gif) + +The system uses a client-server architecture where dtail servers run on target machines (listening on port 2222) and clients connect to multiple servers simultaneously. It can also operate in serverless mode for local operations. The implementation leverages SSH for secure communication, includes sophisticated connection throttling and resource management, and provides specialized tools (dcat, dgrep, dmap) for different log processing tasks. The MapReduce functionality supports SQL-like queries with server-side local aggregation and client-side final aggregation, enabling powerful distributed analytics across log data. + +[View on Codeberg](https://codeberg.org/snonux/dtail) +[View on GitHub](https://github.com/snonux/dtail) + +Go from `cmd/dcat/main.go`: ```AUTO -func isGitHostedImage(url string) bool { - return strings.Contains(url, "github.com") || - strings.Contains(url, "githubusercontent.com") || - strings.Contains(url, "codeberg.org") || - strings.Contains(url, "codeberg.page") +flag.StringVar(&args.SSHPrivateKeyFilePath, "key", "", "Path to private key") +flag.StringVar(&args.ServersStr, "servers", "", "Remote servers to connect") +flag.StringVar(&args.UserName, "user", userName, "Your system user name") +flag.StringVar(&args.What, "files", "", "File(s) to read") +flag.StringVar(&pprof, "pprof", "", "Start PProf server this address") + +profiling.AddFlags(&profileFlags) + +flag.Parse() +config.Setup(source.Client, &args, flag.Args()) + +if displayVersion { + version.PrintAndExit() +} +``` + +--- + +### rexfiles + +* 💻 Languages: Perl (38.3%), Shell (30.6%), Config (8.0%), CSS (7.9%), TOML (6.9%), Ruby (5.8%), Lua (1.7%), JSON (0.7%), INI (0.1%) +* 📚 Documentation: Text (97.3%), Markdown (2.7%) +* 📊 Commits: 880 +* 📈 Lines of Code: 4142 +* 📄 Lines of Documentation: 854 +* 📅 Development Period: 2021-12-28 to 2025-07-16 +* 🔥 Recent Activity: 22.0 days (avg. age of last 42 commits) +* ⚖️ License: No license found +* 🧪 Status: Experimental (no releases yet) + + +Based on my analysis of the codebase, **rexfiles** is a comprehensive infrastructure automation and configuration management project built with the Rex framework (a Perl-based alternative to Ansible, Puppet, or Chef). The project provides structured automation for managing multiple aspects of a personal infrastructure, including dotfiles, server configurations, and application deployments. + +The project consists of three main components: **dotfiles** management for personal development environment configuration (bash, fish shell, helix editor, tmux, etc.), **frontends** for managing production OpenBSD servers with services like DNS (nsd), web servers (httpd), mail (OpenSMTPD), SSL certificates (ACME), and monitoring systems, and **babylon5** containing Docker container startup scripts for self-hosted applications. The implementation leverages Rex's declarative syntax to define tasks for package installation, file management, service configuration, and system state management, with templates for configuration files and support for multiple operating systems (OpenBSD, FreeBSD, Fedora Linux, Termux). This approach provides a KISS (Keep It Simple, Stupid) alternative to more complex configuration management tools while maintaining the ability to manage both local development environments and production infrastructure consistently. + +[View on Codeberg](https://codeberg.org/snonux/rexfiles) +[View on GitHub](https://github.com/snonux/rexfiles) + +Perl from `frontends/scripts/foostats.pl`: + +```AUTO +sub write ( $path, $content ) { + open my $fh, '>', "$path.tmp" + or die "\nCannot open file: $!"; + print $fh $content; + close $fh; + + rename + "$path.tmp", + $path; } ``` @@ -121,7 +257,7 @@ func isGitHostedImage(url string) bool { * 📈 Lines of Code: 873 * 📄 Lines of Documentation: 135 * 📅 Development Period: 2025-06-25 to 2025-07-12 -* 🔥 Recent Activity: 15.4 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 22.2 days (avg. age of last 42 commits) * ⚖️ License: BSD-2-Clause * 🏷️ Latest Release: v0.0.0 (2025-06-29) * 🤖 AI-Assisted: This project was partially created with the help of generative AI @@ -154,7 +290,7 @@ func tick() tea.Cmd { * 📈 Lines of Code: 6160 * 📄 Lines of Documentation: 162 * 📅 Development Period: 2025-06-19 to 2025-07-12 -* 🔥 Recent Activity: 16.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 22.9 days (avg. age of last 42 commits) * ⚖️ License: BSD-2-Clause * 🏷️ Latest Release: v0.9.2 (2025-07-02) * 🎵 Vibe-Coded: This project has been vibe coded @@ -171,46 +307,27 @@ The implementation follows a clean architecture with clear separation of concern [View on Codeberg](https://codeberg.org/snonux/tasksamurai) [View on GitHub](https://github.com/snonux/tasksamurai) -Go from `internal/version.go`: +Go from `internal/task/task.go`: ```AUTO -const Version = "0.9.2" -``` - ---- - -### rexfiles - -* 💻 Languages: Perl (38.2%), Shell (30.6%), Config (8.0%), CSS (7.9%), TOML (7.0%), Ruby (5.7%), Lua (1.7%), JSON (0.7%), INI (0.1%) -* 📚 Documentation: Text (97.3%), Markdown (2.7%) -* 📊 Commits: 876 -* 📈 Lines of Code: 4123 -* 📄 Lines of Documentation: 854 -* 📅 Development Period: 2021-12-28 to 2025-07-12 -* 🔥 Recent Activity: 18.8 days (avg. age of last 42 commits) -* ⚖️ License: No license found -* 🧪 Status: Experimental (no releases yet) - - -Based on my analysis of the codebase, **rexfiles** is a comprehensive infrastructure automation and configuration management project built with the Rex framework (a Perl-based alternative to Ansible, Puppet, or Chef). The project provides structured automation for managing multiple aspects of a personal infrastructure, including dotfiles, server configurations, and application deployments. - -The project consists of three main components: **dotfiles** management for personal development environment configuration (bash, fish shell, helix editor, tmux, etc.), **frontends** for managing production OpenBSD servers with services like DNS (nsd), web servers (httpd), mail (OpenSMTPD), SSL certificates (ACME), and monitoring systems, and **babylon5** containing Docker container startup scripts for self-hosted applications. The implementation leverages Rex's declarative syntax to define tasks for package installation, file management, service configuration, and system state management, with templates for configuration files and support for multiple operating systems (OpenBSD, FreeBSD, Fedora Linux, Termux). This approach provides a KISS (Keep It Simple, Stupid) alternative to more complex configuration management tools while maintaining the ability to manage both local development environments and production infrastructure consistently. - -[View on Codeberg](https://codeberg.org/snonux/rexfiles) -[View on GitHub](https://github.com/snonux/rexfiles) - -Perl from `frontends/scripts/foostats.pl`: +func SetDebugLog(path string) error { + if debugFile != nil { + debugFile.Close() + debugFile = nil + debugWriter = nil + } -```AUTO -sub write ( $path, $content ) { - open my $fh, '>', "$path.tmp" - or die "\nCannot open file: $!"; - print $fh $content; - close $fh; + if path == "" { + return nil + } - rename - "$path.tmp", - $path; + f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o644) + if err != nil { + return err + } + debugFile = f + debugWriter = f + return nil } ``` @@ -218,13 +335,13 @@ sub write ( $path, $content ) { ### ior -* 💻 Languages: Go (81.0%), Raku (11.5%), C (4.4%), Make (1.7%), C/C++ (1.5%) +* 💻 Languages: Go (50.2%), C (43.4%), Raku (4.4%), Make (1.1%), C/C++ (0.9%) * 📚 Documentation: Text (63.6%), Markdown (36.4%) -* 📊 Commits: 330 -* 📈 Lines of Code: 7911 +* 📊 Commits: 331 +* 📈 Lines of Code: 12762 * 📄 Lines of Documentation: 742 -* 📅 Development Period: 2024-01-18 to 2025-07-12 -* 🔥 Recent Activity: 56.3 days (avg. age of last 42 commits) +* 📅 Development Period: 2024-01-18 to 2025-07-14 +* 🔥 Recent Activity: 60.9 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) * 🤖 AI-Assisted: This project was partially created with the help of generative AI @@ -243,19 +360,32 @@ The architecture combines kernel-level tracing with user-space analysis: eBPF pr [View on Codeberg](https://codeberg.org/snonux/ior) [View on GitHub](https://github.com/snonux/ior) -Go from `internal/file/file.go`: +Go from `tools/filewriter/main.go`: ```AUTO -func NewFd(fd int32, name []byte, flags int32) FdFile { - f := FdFile{ - fd: fd, - name: types.StringValue(name), - flags: Flags(flags), +func main() { + file, err := os.OpenFile("output.txt", os.O_APPEND|os.O_CREATE|os.O_WRONLY, + 0644) + if err != nil { + panic(err) } - if f.flags == -1 { - panic(fmt.Sprintf("DEBUG with -1 flags: %v", f)) + defer file.Close() + + data := []byte("A") + + for { + _, err := file.Write(data) + if err != nil { + panic(err) + } + + err = file.Sync() + if err != nil { + panic(err) + } + + time.Sleep(3 * time.Second) } - return f } ``` @@ -269,7 +399,7 @@ func NewFd(fd int32, name []byte, flags int32) FdFile { * 📈 Lines of Code: 396 * 📄 Lines of Documentation: 24 * 📅 Development Period: 2025-04-18 to 2025-05-11 -* 🔥 Recent Activity: 74.9 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 81.7 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🏷️ Latest Release: v1.0.0 (2025-05-11) @@ -302,7 +432,7 @@ def initialize(myself) * 📈 Lines of Code: 25762 * 📄 Lines of Documentation: 3101 * 📅 Development Period: 2008-05-15 to 2025-06-27 -* 🔥 Recent Activity: 88.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 95.1 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🧪 Status: Experimental (no releases yet) * 🤖 AI-Assisted: This project was partially created with the help of generative AI @@ -317,16 +447,14 @@ The project is built on an event-driven architecture with clear component separa [View on Codeberg](https://codeberg.org/snonux/ds-sim) [View on GitHub](https://github.com/snonux/ds-sim) -Java from `src/main/java/protocols/implementations/VSPingPongProtocol.java`: +Java from `src/main/java/testing/QuietProtocolTestRunner.java`: ```AUTO -private int clientCounter; - -private int serverCounter; +private final PrintStream target; +private final StringBuilder buffer = new StringBuilder(); -public VSPingPongProtocol() { - super(VSAbstractProtocol.HAS_ON_CLIENT_START); - setClassname(getClass().toString()); +public FilteredOutputStream(PrintStream target) { + this.target = target; } ``` @@ -340,7 +468,7 @@ public VSPingPongProtocol() { * 📈 Lines of Code: 33 * 📄 Lines of Documentation: 3 * 📅 Development Period: 2025-04-03 to 2025-04-03 -* 🔥 Recent Activity: 100.9 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 107.7 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -366,14 +494,13 @@ func main() { * 💻 Languages: Go (98.6%), YAML (1.1%), JSON (0.2%) * 📚 Documentation: Markdown (100.0%) -* 📊 Commits: 381 +* 📊 Commits: 382 * 📈 Lines of Code: 3967 -* 📄 Lines of Documentation: 411 -* 📅 Development Period: 2024-05-04 to 2025-06-12 -* 🔥 Recent Activity: 117.8 days (avg. age of last 42 commits) +* 📄 Lines of Documentation: 324 +* 📅 Development Period: 2024-05-04 to 2025-07-12 +* 🔥 Recent Activity: 120.8 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🏷️ Latest Release: v1.0.0 (2025-03-04) -* 🤖 AI-Assisted: This project was partially created with the help of generative AI [](showcase/gos/image-1.png) @@ -387,27 +514,56 @@ The tool is architected around a file-based queueing system where posts progress [View on Codeberg](https://codeberg.org/snonux/gos) [View on GitHub](https://github.com/snonux/gos) -Go from `internal/config/args.go`: +Go from `internal/platforms/mastodon/mastodon.go`: ```AUTO -func (a *Args) ParsePlatforms(platformStrs string) error { - a.Platforms = make(map[string]int) - - for _, platformInfo := range strings.Split(platformStrs, ",") { - parts := strings.Split(platformInfo, ":") - platformStr := parts[0] - - if len(parts) > 1 { - var err error - a.Platforms[platformStr], err = strconv.Atoi(parts[1]) - if err != nil { - return err - } - } else { - colour.Infoln("No message length specified for", platformStr, "so assuming - 500") - a.Platforms[platformStr] = 500 - } +func Post(ctx context.Context, args config.Args, sizeLimit int, en entry.Entry) + error { + content, _, err := en.ContentWithLimit(sizeLimit) + if err != nil { + return err + } + if args.DryRun { + colour.Infoln("Not posting", en, "to Mastodon as dry-run enabled") + return nil + } + if content, err = prompt.FileAction("Do you want to post this message to + Mastodon?", + content, en.Path, prompt.RandomOption); err != nil { + return err + } + + payload := map[string]string{"status": content} + payloadBytes, err := json.Marshal(payload) + if err != nil { + return fmt.Errorf("failed to marshal payload: %w", err) + } + + newCtx, cancel := context.WithTimeout(ctx, mastodonTimeout) + defer cancel() + req, err := http.NewRequestWithContext(newCtx, "POST", + args.Config.MastodonURL, bytes.NewBuffer(payloadBytes)) + if err != nil { + return fmt.Errorf("failed to create request: %w", err) + } + + req.Header.Set("Authorization", "Bearer "+args.Config.MastodonAccessToken) + req.Header.Set("Content-Type", "application/json") + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return fmt.Errorf("request failed: %w", err) + } + defer resp.Body.Close() + body, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("unexpected status code: %d\n%s\n", + resp.StatusCode, string(body)) } return nil } @@ -423,7 +579,7 @@ func (a *Args) ParsePlatforms(platformStrs string) error { * 📈 Lines of Code: 1586 * 📄 Lines of Documentation: 154 * 📅 Development Period: 2023-01-02 to 2025-07-12 -* 🔥 Recent Activity: 121.8 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 128.6 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🏷️ Latest Release: v0.1.0 (2025-07-12) @@ -460,7 +616,7 @@ sub write ( $path, $content ) { * 📈 Lines of Code: 1373 * 📄 Lines of Documentation: 48 * 📅 Development Period: 2024-12-05 to 2025-02-28 -* 🔥 Recent Activity: 141.6 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 148.4 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🧪 Status: Experimental (no releases yet) @@ -472,53 +628,15 @@ The system is implemented with a modular architecture centered around a DSL clas [View on Codeberg](https://codeberg.org/snonux/rcm) [View on GitHub](https://github.com/snonux/rcm) -Ruby from `lib/dslkeywords/given.rb`: +Ruby from `lib/dsl.rb`: ```AUTO -def respond_to_missing? = true - -def met? - return false if @conds.key?(:hostname) && Socket.gethostname != - @conds[:hostname].to_s - - true -end -``` - ---- - -### gemtexter - -* 💻 Languages: Shell (68.1%), CSS (28.7%), Config (1.9%), HTML (1.3%) -* 📚 Documentation: Text (76.1%), Markdown (23.9%) -* 📊 Commits: 465 -* 📈 Lines of Code: 2268 -* 📄 Lines of Documentation: 1180 -* 📅 Development Period: 2021-05-21 to 2025-07-09 -* 🔥 Recent Activity: 204.0 days (avg. age of last 42 commits) -* ⚖️ License: GPL-3.0 -* 🏷️ Latest Release: 3.0.0 (2024-10-01) - - -**Gemtexter** is a static site generator and blog engine that transforms content written in Gemini Gemtext format into multiple output formats. It's a comprehensive Bash-based tool designed to support the Gemini protocol (a simpler alternative to HTTP) while maintaining compatibility with traditional web technologies. The project converts a single source of Gemtext content into HTML (XHTML 1.0 Transitional), Markdown, and native Gemtext formats, enabling authors to write once and publish across multiple platforms including Gemini capsules, traditional websites, and GitHub/Codeberg pages. - -The implementation is built entirely in Bash (version 5.x+) using a modular library approach with separate source files for different functionality (atomfeed, gemfeed, HTML generation, Markdown conversion, templating, etc.). Key features include automatic blog post indexing, Atom feed generation, customizable HTML themes, source code highlighting, Bash-based templating system, and integrated Git workflow management. The architecture separates content directories by format (gemtext/, html/, md/) and includes comprehensive theming support, font embedding, and publishing workflows that can automatically sync content to multiple Git repositories for deployment on various platforms. - -[View on Codeberg](https://codeberg.org/snonux/gemtexter) -[View on GitHub](https://github.com/snonux/gemtexter) - -Shell from `lib/generate.source.sh`: - -```AUTO -done < <(find "$CONTENT_BASE_DIR/gemtext" -type f -name \*.gmi) - -wait -log INFO "Converted $num_gmi_files Gemtext files" - -log VERBOSE "Adding other docs to $*" - -while read -r src; do - num_doc_files=$(( num_doc_files + 1 )) +def configure(reset: false, &block) + RCM::DSL.new(reset) do |rcm| + rcm.info('Configuring...') + rcm.instance_eval(&block) + rcm.evaluate! if rcm.conds_met + end ``` --- @@ -531,7 +649,7 @@ while read -r src; do * 📈 Lines of Code: 917 * 📄 Lines of Documentation: 33 * 📅 Development Period: 2024-01-20 to 2025-07-06 -* 🔥 Recent Activity: 451.6 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 458.4 days (avg. age of last 42 commits) * ⚖️ License: MIT * 🏷️ Latest Release: v0.0.3 (2025-07-06) @@ -602,7 +720,7 @@ func createPreferenceWindow(a fyne.App) fyne.Window { * 📈 Lines of Code: 12 * 📄 Lines of Documentation: 3 * 📅 Development Period: 2024-03-24 to 2024-03-24 -* 🔥 Recent Activity: 475.4 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 482.2 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🧪 Status: Experimental (no releases yet) @@ -639,7 +757,7 @@ aws: build * 📈 Lines of Code: 2850 * 📄 Lines of Documentation: 52 * 📅 Development Period: 2023-08-27 to 2025-04-05 -* 🔥 Recent Activity: 505.4 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 512.2 days (avg. age of last 42 commits) * ⚖️ License: MIT * 🧪 Status: Experimental (no releases yet) @@ -651,18 +769,20 @@ The system is designed to host multiple personal services including Anki sync se [View on Codeberg](https://codeberg.org/snonux/terraform) [View on GitHub](https://github.com/snonux/terraform) -HCL from `org-buetow-base/ecr.tf`: +HCL from `org-buetow-ecs/bagservice.tf`: ```AUTO -resource "aws_ecr_repository" "radicale-read" { - name = "radicale" + type = "A" - tags = { - Name = "radicale" + alias { + name = + data.terraform_remote_state.elb.outputs.alb_dns_name + zone_id = data.terraform_remote_state.elb.outputs.alb_zone_id + evaluate_target_health = true } } -resource "aws_iam_policy" "ecr_radicale_read" { +resource "aws_route53_record" "aaaa_record_bag" { ``` --- @@ -675,7 +795,7 @@ resource "aws_iam_policy" "ecr_radicale_read" { * 📈 Lines of Code: 1096 * 📄 Lines of Documentation: 287 * 📅 Development Period: 2023-04-17 to 2025-06-12 -* 🔥 Recent Activity: 518.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 525.0 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🏷️ Latest Release: v1.1.0 (2024-05-03) * 🤖 AI-Assisted: This project was partially created with the help of generative AI @@ -690,32 +810,48 @@ The implementation follows a clean architecture with concurrent check execution, [View on Codeberg](https://codeberg.org/snonux/gogios) [View on GitHub](https://github.com/snonux/gogios) -Go from `internal/check.go`: +Go from `internal/state.go`: ```AUTO -func (c check) run(ctx context.Context, name string) checkResult { - cmd := exec.CommandContext(ctx, c.Plugin, c.Args...) +func newState(conf config) (state, error) { + s := state{ + stateFile: fmt.Sprintf("%s/state.json", conf.StateDir), + checks: make(map[string]checkState), + staleEpoch: time.Now().Unix() - int64(conf.StaleThreshold), + } - var bytes bytes.Buffer - cmd.Stdout = &bytes - cmd.Stderr = &bytes + if _, err := os.Stat(s.stateFile); err != nil { + return s, nil + } - if err := cmd.Run(); err != nil { - if ctx.Err() == context.DeadlineExceeded { - return checkResult{name, "Check command timed out", time.Now().Unix(), - nagiosCritical, false} - } + file, err := os.Open(s.stateFile) + if err != nil { + return s, err } + defer file.Close() - parts := strings.Split(bytes.String(), "|") - output := strings.TrimSpace(parts[0]) + bytes, err := io.ReadAll(file) + if err != nil { + return s, err + } - ec := cmd.ProcessState.ExitCode() - if ec < int(nagiosOk) || ec > int(nagiosUnknown) { - ec = int(nagiosUnknown) + if err := json.Unmarshal(bytes, &s.checks); err != nil { + return s, err } - return checkResult{name, output, time.Now().Unix(), nagiosCode(ec), false} + var obsolete []string + for name := range s.checks { + if _, ok := conf.Checks[name]; !ok { + obsolete = append(obsolete, name) + } + } + + for _, name := range obsolete { + delete(s.checks, name) + log.Printf("State of %s is obsolete (removed)", name) + } + + return s, nil } ``` @@ -729,7 +865,7 @@ func (c check) run(ctx context.Context, name string) checkResult { * 📈 Lines of Code: 32 * 📄 Lines of Documentation: 3 * 📅 Development Period: 2023-12-31 to 2023-12-31 -* 🔥 Recent Activity: 558.9 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 565.7 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -766,7 +902,7 @@ run: build * 📈 Lines of Code: 29 * 📄 Lines of Documentation: 3 * 📅 Development Period: 2023-08-13 to 2024-01-01 -* 🔥 Recent Activity: 652.2 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 659.0 days (avg. age of last 42 commits) * ⚖️ License: MIT * 🧪 Status: Experimental (no releases yet) @@ -804,7 +940,7 @@ aws: * 📈 Lines of Code: 1525 * 📄 Lines of Documentation: 15 * 📅 Development Period: 2023-04-17 to 2023-11-19 -* 🔥 Recent Activity: 704.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 711.1 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🧪 Status: Experimental (no releases yet) @@ -816,16 +952,15 @@ The architecture consists of several key components: a quorum manager that handl [View on Codeberg](https://codeberg.org/snonux/gorum) [View on GitHub](https://github.com/snonux/gorum) -Go from `internal/vote/vote.go`: +Go from `internal/utils/string.go`: ```AUTO -func New(conf config.Config, ids ...string) (Vote, error) { - var v Vote - - v.FromID = conf.MyID - v.IDs = ids + "strings" +) - return v, nil +func StripPort(addr string) string { + parts := strings.Split(addr, ":") + return parts[0] } ``` @@ -839,7 +974,7 @@ func New(conf config.Config, ids ...string) (Vote, error) { * 📈 Lines of Code: 312 * 📄 Lines of Documentation: 416 * 📅 Development Period: 2013-03-22 to 2025-05-18 -* 🔥 Recent Activity: 754.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 761.1 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: v1.0.0 (2023-04-29) @@ -882,7 +1017,7 @@ method output-trim(Str \str, UInt \line-limit --> Str) { * 📈 Lines of Code: 51 * 📄 Lines of Documentation: 26 * 📅 Development Period: 2022-06-02 to 2024-04-20 -* 🔥 Recent Activity: 769.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 775.9 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -907,58 +1042,39 @@ declare -i NUM_PAGES_TO_EXTRACT=42 # This is the answear! --- -### dtail +### gemtexter -* 💻 Languages: Go (91.1%), JSON (4.1%), C (2.9%), Make (0.6%), C/C++ (0.5%), Config (0.3%), Shell (0.2%), Docker (0.2%) -* 📚 Documentation: Text (80.4%), Markdown (19.6%) -* 📊 Commits: 1049 -* 📈 Lines of Code: 13525 -* 📄 Lines of Documentation: 5375 -* 📅 Development Period: 2020-01-09 to 2023-10-05 -* 🔥 Recent Activity: 781.8 days (avg. age of last 42 commits) -* ⚖️ License: Apache-2.0 -* 🏷️ Latest Release: v4.2.0 (2023-06-21) +* 💻 Languages: Shell (86.6%), CSS (8.3%), Config (3.2%), HTML (1.9%) +* 📚 Documentation: Text (68.0%), Markdown (32.0%) +* 📊 Commits: 465 +* 📈 Lines of Code: 1585 +* 📄 Lines of Documentation: 778 +* 📅 Development Period: 2021-05-21 to 2023-07-17 +* 🔥 Recent Activity: 824.5 days (avg. age of last 42 commits) +* ⚖️ License: GPL-3.0 +* 🏷️ Latest Release: 3.0.0 (2024-10-01) ⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. -[](showcase/dtail/image-1.png) - -DTail is a distributed log processing system written in Go that allows DevOps engineers to tail, cat, and grep log files across thousands of servers concurrently. It provides secure access through SSH authentication and respects UNIX file system permissions, making it ideal for enterprise environments where log analysis needs to scale horizontally across large server fleets. The tool supports advanced features like compressed file handling (gzip/zstd) and distributed MapReduce aggregations for complex log analytics. - -[](showcase/dtail/image-2.gif) +**Gemtexter** is a static site generator and blog engine that transforms content written in Gemini Gemtext format into multiple output formats. It's a comprehensive Bash-based tool designed to support the Gemini protocol (a simpler alternative to HTTP) while maintaining compatibility with traditional web technologies. The project converts a single source of Gemtext content into HTML (XHTML 1.0 Transitional), Markdown, and native Gemtext formats, enabling authors to write once and publish across multiple platforms including Gemini capsules, traditional websites, and GitHub/Codeberg pages. -The system uses a client-server architecture where dtail servers run on target machines (listening on port 2222) and clients connect to multiple servers simultaneously. It can also operate in serverless mode for local operations. The implementation leverages SSH for secure communication, includes sophisticated connection throttling and resource management, and provides specialized tools (dcat, dgrep, dmap) for different log processing tasks. The MapReduce functionality supports SQL-like queries with server-side local aggregation and client-side final aggregation, enabling powerful distributed analytics across log data. +The implementation is built entirely in Bash (version 5.x+) using a modular library approach with separate source files for different functionality (atomfeed, gemfeed, HTML generation, Markdown conversion, templating, etc.). Key features include automatic blog post indexing, Atom feed generation, customizable HTML themes, source code highlighting, Bash-based templating system, and integrated Git workflow management. The architecture separates content directories by format (gemtext/, html/, md/) and includes comprehensive theming support, font embedding, and publishing workflows that can automatically sync content to multiple Git repositories for deployment on various platforms. -[View on Codeberg](https://codeberg.org/snonux/dtail) -[View on GitHub](https://github.com/snonux/dtail) +[View on Codeberg](https://codeberg.org/snonux/gemtexter) +[View on GitHub](https://github.com/snonux/gemtexter) -Go from `internal/io/fs/readfilelcontext.go`: +Shell from `lib/md.source.sh`: ```AUTO -func (f *readFile) lContextNotMatched(ctx context.Context, ls *ltxState, - lines chan<- *line.Line, rawLine *bytes.Buffer) readStatus { - - if ls.processAfter && ls.after > 0 { - ls.after-- - myLine := line.New(rawLine, f.totalLineCount(), 100, f.globID) - - select { - case lines <- myLine: - case <-ctx.Done(): - return abortReading - } - - } else if ls.processBefore { - select { - case ls.beforeBuf <- rawLine: - default: - pool.RecycleBytesBuffer(<-ls.beforeBuf) - ls.beforeBuf <- rawLine - } - } - - return continueReading -} +md::make_img () { + local link="$1"; shift + local descr="$1"; shift + + if [ -z "$descr" ]; then + echo "[]($link) " + else + echo "[]($link) " + fi ``` --- @@ -971,7 +1087,7 @@ func (f *readFile) lContextNotMatched(ctx context.Context, ls *ltxState, * 📈 Lines of Code: 41 * 📄 Lines of Documentation: 17 * 📅 Development Period: 2020-01-30 to 2025-04-30 -* 🔥 Recent Activity: 1062.6 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 1069.4 days (avg. age of last 42 commits) * ⚖️ License: GPL-3.0 * 🧪 Status: Experimental (no releases yet) @@ -983,16 +1099,10 @@ The implementation consists of two main components: `autorotate.sh` monitors the [View on Codeberg](https://codeberg.org/snonux/sway-autorotate) [View on GitHub](https://github.com/snonux/sway-autorotate) -Shell from `autorotate.sh`: +Shell from `start.sh`: ```AUTO -set -euf -o pipefail - -declare -r WAYLANDINPUT=( - '1118:2485:Microsoft_Surface_Keyboard_Touchpad' - '1267:10780:ELAN9038:00_04F3:2A1C' -) -declare -r SCREEN=eDP-1 +nohup bash autorotate.sh &> autorotate.log ``` --- @@ -1005,7 +1115,7 @@ declare -r SCREEN=eDP-1 * 📈 Lines of Code: 342 * 📄 Lines of Documentation: 39 * 📅 Development Period: 2011-11-19 to 2022-04-02 -* 🔥 Recent Activity: 1282.2 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 1288.9 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 0.5.0 (2022-02-21) @@ -1047,7 +1157,7 @@ scalephotos () { * 📈 Lines of Code: 1728 * 📄 Lines of Documentation: 18 * 📅 Development Period: 2020-07-12 to 2023-04-09 -* 🔥 Recent Activity: 1433.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 1440.1 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🧪 Status: Experimental (no releases yet) @@ -1060,16 +1170,19 @@ The project leverages Go's generics system to provide type-safe implementations [View on Codeberg](https://codeberg.org/snonux/algorithms) [View on GitHub](https://github.com/snonux/algorithms) -Go from `queue/priority.go`: +Go from `ds/arraylist.go`: ```AUTO -type PriorityQueue interface { - Insert(a int) - Max() (max int) - DeleteMax() int - Empty() bool - Size() int - Clear() +func NewRandomArrayList[V Number](l, max int) ArrayList[V] { + a := make(ArrayList[V], l) + for i := 0; i < l; i++ { + if max > 0 { + a[i] = V(rand.Intn(max)) + continue + } + a[i] = V(rand.Int()) + } + return a } ``` @@ -1083,7 +1196,7 @@ type PriorityQueue interface { * 📈 Lines of Code: 671 * 📄 Lines of Documentation: 19 * 📅 Development Period: 2018-05-26 to 2025-01-21 -* 🔥 Recent Activity: 1435.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 1441.9 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -1112,11 +1225,11 @@ def out(message, prefix, flag = :none) ### foo.zone * 📚 Documentation: Markdown (100.0%) -* 📊 Commits: 2911 +* 📊 Commits: 2933 * 📈 Lines of Code: 0 * 📄 Lines of Documentation: 23 * 📅 Development Period: 2021-05-21 to 2022-04-02 -* 🔥 Recent Activity: 1448.9 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 1455.7 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -1139,7 +1252,7 @@ The site is built using **Gemtexter**, a static site generator that creates both * 📈 Lines of Code: 51 * 📄 Lines of Documentation: 69 * 📅 Development Period: 2014-03-24 to 2022-04-23 -* 🔥 Recent Activity: 1914.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 1921.0 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -1173,7 +1286,7 @@ sub hello() { * 📈 Lines of Code: 12420 * 📄 Lines of Documentation: 610 * 📅 Development Period: 2018-03-01 to 2020-01-22 -* 🔥 Recent Activity: 2455.8 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 2462.6 days (avg. age of last 42 commits) * ⚖️ License: Apache-2.0 * 🏷️ Latest Release: 0.5.1 (2019-01-04) @@ -1188,6 +1301,21 @@ The tool is implemented in C for minimal overhead and uses SystemTap for efficie [View on Codeberg](https://codeberg.org/snonux/ioriot) [View on GitHub](https://github.com/snonux/ioriot) +C from `ioriot/src/mounts.c`: + +```AUTO +struct timeval tv; +gettimeofday(&tv, NULL); + +char *wd_path = NULL; +asprintf(&wd_path, "%s/%s", opts->wd_base, opts->name); + +char *trash_path = NULL; +asprintf(&trash_path, "%s/.trash/%ld", opts->wd_base, tv.tv_sec); + +if (is_dir(wd_path)) { +``` + --- ### staticfarm-apache-handlers @@ -1198,7 +1326,7 @@ The tool is implemented in C for minimal overhead and uses SystemTap for efficie * 📈 Lines of Code: 919 * 📄 Lines of Documentation: 12 * 📅 Development Period: 2015-01-02 to 2021-11-04 -* 🔥 Recent Activity: 2964.5 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 2971.3 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 1.1.3 (2015-01-02) @@ -1211,51 +1339,13 @@ The system is particularly useful for distributed static content delivery where [View on Codeberg](https://codeberg.org/snonux/staticfarm-apache-handlers) [View on GitHub](https://github.com/snonux/staticfarm-apache-handlers) -Perl from `debian/staticfarm-apache-handlers/usr/share/staticfarm/apache/handlers/StaticFarm/API.pm`: +Perl from `debian/staticfarm-apache-handlers/usr/share/staticfarm/apache/handlers/StaticFarm/CacheControl.pm`: ```AUTO -sub handler { - my $r = shift; - $r->content_type('application/json'); - - my $method = $r->method(); - - my $d = { - method => $method, - uri => $r->uri(), - args => $r->args(), - out => { message => "" }, - }; - - ($d->{path}) = $r->uri() =~ /^$URI_PREFIX(.*)/; - $d->{fullpath} = "$CONTENT_DIR$d->{path}"; - - my %params = map { - s/\.\.//g; - my ($k, $v) = split '=', $_; - $v - $k => $v; - } split '&', $r->args(); - - $d->{params} = \%params; +sub my_warn { + my $msg = shift; - if ($method eq 'GET') { - handler_get($r, $d); - - } elsif ($method eq 'DELETE') { - handler_delete($r, $d); - - } elsif ($method eq 'POST') { - handler_post($r, $d); - - } elsif ($method eq 'PUT') { - handler_put($r, $d); - - } else { - handler_unknown($r, $d); - } - - return Apache2::Const::DONE; + Apache2::ServerRec::warn("CacheControl: $msg"); } ``` @@ -1269,7 +1359,7 @@ sub handler { * 📈 Lines of Code: 18 * 📄 Lines of Documentation: 49 * 📅 Development Period: 2014-03-24 to 2021-11-05 -* 🔥 Recent Activity: 3200.4 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3207.2 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -1292,7 +1382,7 @@ The implementation consists of a shell script (`update-dyndns`) that accepts hos * 📈 Lines of Code: 5360 * 📄 Lines of Documentation: 789 * 📅 Development Period: 2015-01-02 to 2021-11-05 -* 🔥 Recent Activity: 3467.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3473.9 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 1.0.1 (2015-01-02) @@ -1305,17 +1395,24 @@ The tool is particularly useful for system administrators and DevOps engineers w [View on Codeberg](https://codeberg.org/snonux/mon) [View on GitHub](https://github.com/snonux/mon) -Perl from `lib/MON/Cache.pm`: +Perl from `debian/mon/usr/share/mon/lib/MAPI/QueryBase.pm`: ```AUTO -sub new { - my ( $class, %opts ) = @_; +sub check_has { + my ( $self, $key, $in ) = @_; - my $self = bless \%opts, $class; + if ( ref $in eq 'HASH' && exists $in->{$key} ) { + return 1; - $self->init(); + } + else { + for (@$in) { + return 1 if $_ eq $key; + } + } - return $self; + my @possible = sort ( ref $in eq 'HASH' ? keys %$in : @$in ); + $self->error("'$key' not expected here. Possible: @possible"); } ``` @@ -1329,7 +1426,7 @@ sub new { * 📈 Lines of Code: 273 * 📄 Lines of Documentation: 32 * 📅 Development Period: 2015-09-29 to 2021-11-05 -* 🔥 Recent Activity: 3471.2 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3478.0 days (avg. age of last 42 commits) * ⚖️ License: Apache-2.0 * 🏷️ Latest Release: 0 (2015-10-26) @@ -1365,7 +1462,7 @@ def initialize * 📈 Lines of Code: 1839 * 📄 Lines of Documentation: 412 * 📅 Development Period: 2015-01-02 to 2021-11-05 -* 🔥 Recent Activity: 3550.9 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3557.7 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 1.0.2 (2015-01-02) @@ -1378,22 +1475,15 @@ The project is implemented as a modular Perl application with a clean architectu [View on Codeberg](https://codeberg.org/snonux/pingdomfetch) [View on GitHub](https://github.com/snonux/pingdomfetch) -Perl from `lib/PINGDOMFETCH/Pingdomfetch.pm`: +Perl from `lib/PINGDOMFETCH/Result.pm`: ```AUTO sub new { - my ( $class, $opts ) = @_; + my ( $class, %vals ) = @_; - my $config = PINGDOMFETCH::Config->new($opts); - my $pingdom = PINGDOMFETCH::Pingdom->new($config); + my $self = bless \%vals, $class; - my $self = bless { - config => $config, - pingdom => $pingdom, - dots_counter => 0, - }, $class; - - $self->init_from_to_interval(); + $self->compute(); return $self; } @@ -1409,7 +1499,7 @@ sub new { * 📈 Lines of Code: 499 * 📄 Lines of Documentation: 8 * 📅 Development Period: 2015-05-24 to 2021-11-03 -* 🔥 Recent Activity: 3561.6 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3568.4 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 0.1 (2015-06-01) @@ -1422,40 +1512,18 @@ The implementation follows a concurrent architecture using Go's goroutines and c [View on Codeberg](https://codeberg.org/snonux/gotop) [View on GitHub](https://github.com/snonux/gotop) -Go from `process/process.go`: +Go from `diskstats/diskstats.go`: ```AUTO -func new(pidstr string) (Process, error) { - pid, err := strconv.Atoi(pidstr) - if err != nil { - return Process{}, err - } - - timestamp := int32(time.Now().Unix()) - p := Process{Pid: pid, Timestamp: timestamp} - var rawIo string - - if err = utils.Slurp(&rawIo, fmt.Sprintf("/proc/%d/io", pid)); err != nil { - return p, err - } +func new() (Diskstats, error) { + var raw string + d := Diskstats{} - if err = p.parseRawIo(rawIo); err != nil { - return p, err + if err := utils.Slurp(&raw, "/proc/diskstats"); err != nil { + return d, err } - if err = utils.Slurp(&p.Comm, fmt.Sprintf("/proc/%d/comm", pid)); err != nil { - return p, err - } - - err = utils.Slurp(&p.Cmdline, fmt.Sprintf("/proc/%d/cmdline", pid)) - - if p.Cmdline == "" { - p.Id = fmt.Sprintf("(%s) %s", pidstr, p.Comm) - } else { - p.Id = fmt.Sprintf("(%s) %s", pidstr, p.Cmdline) - } - - return p, err + return d, nil } ``` @@ -1467,7 +1535,7 @@ func new(pidstr string) (Process, error) { * 📊 Commits: 670 * 📈 Lines of Code: 1675 * 📅 Development Period: 2011-03-06 to 2018-12-22 -* 🔥 Recent Activity: 3617.2 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3624.0 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🏷️ Latest Release: v1.0.0 (2018-12-22) @@ -1482,18 +1550,28 @@ The system works through a template-driven architecture where content is written [View on Codeberg](https://codeberg.org/snonux/xerl) [View on GitHub](https://github.com/snonux/xerl) -Perl from `Xerl/XML/Reader.pm`: +Perl from `Xerl/Setup/Configure.pm`: ```AUTO -sub open { - my $self = shift; +sub parse { + my $self = $_[0]; + my $file = Xerl::Tools::FileIO->new( 'path' => $self->get_config() ); - if ( -f $self->get_path() ) { - return 0; + if ( -1 == $file->fslurp() ) { + $self->set_finish_request(1); + return undef; } - else { - return 1; + + my $re = qr/^(.+?) *=(.+?) *\n?$/; + + for ( @{ $file->get_array() } ) { + next if /^\s*#/; + s/#.*//; + + $self->setval( $1, $self->eval($2) ) if $_ =~ $re; } + + return $self; } ``` @@ -1507,7 +1585,7 @@ sub open { * 📈 Lines of Code: 88 * 📄 Lines of Documentation: 148 * 📅 Development Period: 2015-06-18 to 2015-12-05 -* 🔥 Recent Activity: 3665.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3672.1 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -1545,7 +1623,7 @@ done * 📈 Lines of Code: 1681 * 📄 Lines of Documentation: 539 * 📅 Development Period: 2014-03-10 to 2021-11-03 -* 🔥 Recent Activity: 3943.3 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 3950.1 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 1.0.2 (2014-11-17) @@ -1558,21 +1636,15 @@ The implementation is written in Python and built on top of the bigsuds library, [View on Codeberg](https://codeberg.org/snonux/fapi) [View on GitHub](https://github.com/snonux/fapi) -Python from `contrib/bigsuds-1.0/bigsuds.py`: +Python from `contrib/bigsuds-1.0/setup.py`: ```AUTO -class ArgumentError(OperationFailed): - are passed to an iControl method.""" - - -class BIGIP(object): - - Example usage: - >>> b = BIGIP('bigip-hostname') - >>> print b.LocalLB.Pool.get_list() - ['/Common/test_pool'] - >>> b.LocalLB.Pool.add_member(['/Common/test_pool'], \ - [[{'address': '10.10.10.10', 'port': 20030}]]) +def extract_version(filename): + contents = open(filename).read() + match = re.search('^__version__\s+=\s+[\'"](.*)[\'"]\s*$', contents, + re.MULTILINE) + if match is not None: + return match.group(1) ``` --- @@ -1585,7 +1657,7 @@ class BIGIP(object): * 📈 Lines of Code: 65 * 📄 Lines of Documentation: 228 * 📅 Development Period: 2013-03-22 to 2021-11-04 -* 🔥 Recent Activity: 3997.8 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4004.6 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 0.0.0.0 (2013-03-22) @@ -1620,7 +1692,7 @@ build: * 📈 Lines of Code: 136 * 📄 Lines of Documentation: 96 * 📅 Development Period: 2013-03-22 to 2021-11-05 -* 🔥 Recent Activity: 4010.8 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4017.5 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 0.2.0 (2014-07-05) @@ -1655,7 +1727,7 @@ build: * 📈 Lines of Code: 134 * 📄 Lines of Documentation: 106 * 📅 Development Period: 2013-03-22 to 2021-11-05 -* 🔥 Recent Activity: 4018.2 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4025.0 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 0.1.5 (2014-06-22) @@ -1670,46 +1742,6 @@ The tool works by having both hosts run the same command simultaneously - one ac --- -### pwgrep - -* 💻 Languages: Shell (85.0%), Make (15.0%) -* 📚 Documentation: Text (80.8%), Markdown (19.2%) -* 📊 Commits: 142 -* 📈 Lines of Code: 493 -* 📄 Lines of Documentation: 26 -* 📅 Development Period: 2009-09-27 to 2021-11-02 -* 🔥 Recent Activity: 4061.5 days (avg. age of last 42 commits) -* ⚖️ License: No license found -* 🏷️ Latest Release: 0.9.3 (2014-06-14) - -⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. - -**pwgrep** is a command-line password manager built in Bash and GNU AWK that combines GPG encryption with version control (Git by default) for secure password storage and change tracking. It stores encrypted password databases as GPG files and uses a revision control system to maintain a complete history of all changes, making it ideal for users who want both security and accountability in their password management. The tool provides a simple interface where users can search for passwords using `pwgrep searchstring` or edit the database directly with `pwgrep`, and it integrates with various AWK implementations and secure file deletion tools for cross-platform compatibility. - -The implementation leverages GPG for strong encryption, ensuring passwords are never stored in plaintext, while the version control integration (typically Git over SSL/SSH) provides secure synchronization across multiple devices and maintains an audit trail of all database modifications. The project includes comprehensive Debian packaging support and creates multiple command aliases (pwedit, pwfadd, pwfdel, etc.) for different password management operations, making it a complete password management solution that prioritizes security, transparency, and ease of use for technical users comfortable with command-line tools. - -[View on Codeberg](https://codeberg.org/snonux/pwgrep) -[View on GitHub](https://github.com/snonux/pwgrep) - -Shell from `bin/pwgrep.sh`: - -```AUTO -function findbin () { - local -r trylist=$1 - found="" - for bin in $trylist; do - if [ -z $found ]; then - which=$(which $bin) - [ ! -z $which ] && found=$bin - fi - done - - echo $found -} -``` - ---- - ### japi * 💻 Languages: Perl (78.3%), Make (21.7%) @@ -1718,7 +1750,7 @@ function findbin () { * 📈 Lines of Code: 286 * 📄 Lines of Documentation: 144 * 📅 Development Period: 2013-03-22 to 2021-11-05 -* 🔥 Recent Activity: 4066.6 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4073.4 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 0.4.3 (2014-06-16) @@ -1741,7 +1773,7 @@ The implementation uses modern Perl with the Moo object system and consists of t * 📈 Lines of Code: 191 * 📄 Lines of Documentation: 8 * 📅 Development Period: 2014-03-24 to 2014-03-24 -* 🔥 Recent Activity: 4127.8 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4134.6 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🧪 Status: Experimental (no releases yet) @@ -1754,18 +1786,18 @@ Each script explores different themes - Christmas celebrations, mathematical stu [View on Codeberg](https://codeberg.org/snonux/perl-poetry) [View on GitHub](https://github.com/snonux/perl-poetry) -Perl from `perllove.pl`: +Perl from `math.pl`: ```AUTO -no strict; -no warnings; -we: do { print 'love' -or warn and die 'slow' -unless not defined true #respect -} for reverse'd', qw/mind of you/ -and map { 'me' } 'into', undef $mourning; -__END__ -v2 Copyright (2005, 2006) by Paul C. Buetow, http://paul.buetow.org +do { int'egrate'; sub trade; }; +do { exp'onentize' and abs'olutize' }; +study and study and study and study; + +foreach $topic ({of, math}) { +you, m/ay /go, to, limits } + +do { not qw/erk / unless $success +and m/ove /o;$n and study }; ``` --- @@ -1776,7 +1808,7 @@ v2 Copyright (2005, 2006) by Paul C. Buetow, http://paul.buetow.org * 📊 Commits: 7 * 📈 Lines of Code: 80 * 📅 Development Period: 2011-07-09 to 2015-01-13 -* 🔥 Recent Activity: 4207.9 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4214.7 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🧪 Status: Experimental (no releases yet) @@ -1821,15 +1853,38 @@ if ($ENV{SERVER_NAME} eq 'ipv6.buetow.org') { --- +### cpuinfo + +* 💻 Languages: Shell (53.2%), Make (46.8%) +* 📚 Documentation: Text (100.0%) +* 📊 Commits: 28 +* 📈 Lines of Code: 124 +* 📄 Lines of Documentation: 75 +* 📅 Development Period: 2010-11-05 to 2021-11-05 +* 🔥 Recent Activity: 4255.3 days (avg. age of last 42 commits) +* ⚖️ License: No license found +* 🏷️ Latest Release: 1.0.2 (2014-06-22) + +⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. + +**cpuinfo** is a small command-line utility that provides a human-readable summary of CPU information on Linux systems. It parses `/proc/cpuinfo` using AWK to extract and display key processor details including the CPU model, cache size, number of physical processors, cores, and whether hyper-threading is enabled. The tool calculates total CPU frequency and bogomips across all cores, making it easier to understand complex multi-core and multi-processor configurations at a glance. + +The implementation is remarkably simple - a single shell script that uses GNU AWK to parse the kernel's CPU information and format it into a clear, structured output. It's particularly useful for system administrators and developers who need to quickly understand CPU topology, especially on servers with multiple processors or complex threading configurations where the raw `/proc/cpuinfo` output can be overwhelming. + +[View on Codeberg](https://codeberg.org/snonux/cpuinfo) +[View on GitHub](https://github.com/snonux/cpuinfo) + +--- + ### loadbars * 💻 Languages: Perl (97.4%), Make (2.6%) -* 📚 Documentation: Text (93.5%), Markdown (6.5%) +* 📚 Documentation: Text (100.0%) * 📊 Commits: 527 * 📈 Lines of Code: 1828 -* 📄 Lines of Documentation: 107 +* 📄 Lines of Documentation: 100 * 📅 Development Period: 2010-11-05 to 2015-05-23 -* 🔥 Recent Activity: 4215.4 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4285.4 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: 0.7.5 (2014-06-22) @@ -1842,39 +1897,55 @@ The application is implemented using a multi-threaded architecture where each mo [View on Codeberg](https://codeberg.org/snonux/loadbars) [View on GitHub](https://github.com/snonux/loadbars) -Perl from `lib/Loadbars/Utils.pm`: +Perl from `lib/Loadbars/Main.pm`: ```AUTO -sub trim (\$) { - my $str = shift; - $$str =~ s/^[\s\t]+//; - $$str =~ s/[\s\t]+$//; - return undef; +sub percentage ($$) { + my ( $total, $part ) = @_; + + return int( null($part) / notnull( null($total) / 100 ) ); } ``` --- -### cpuinfo +### pwgrep -* 💻 Languages: Shell (53.2%), Make (46.8%) -* 📚 Documentation: Text (100.0%) -* 📊 Commits: 28 -* 📈 Lines of Code: 124 -* 📄 Lines of Documentation: 75 -* 📅 Development Period: 2010-11-05 to 2021-11-05 -* 🔥 Recent Activity: 4248.5 days (avg. age of last 42 commits) +* 💻 Languages: Shell (85.0%), Make (15.0%) +* 📚 Documentation: Text (72.4%), Markdown (27.6%) +* 📊 Commits: 142 +* 📈 Lines of Code: 493 +* 📄 Lines of Documentation: 29 +* 📅 Development Period: 2009-09-27 to 2015-05-23 +* 🔥 Recent Activity: 4298.8 days (avg. age of last 42 commits) * ⚖️ License: No license found -* 🏷️ Latest Release: 1.0.2 (2014-06-22) +* 🏷️ Latest Release: 0.9.3 (2014-06-14) ⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. -**cpuinfo** is a small command-line utility that provides a human-readable summary of CPU information on Linux systems. It parses `/proc/cpuinfo` using AWK to extract and display key processor details including the CPU model, cache size, number of physical processors, cores, and whether hyper-threading is enabled. The tool calculates total CPU frequency and bogomips across all cores, making it easier to understand complex multi-core and multi-processor configurations at a glance. +**pwgrep** is a command-line password manager built in Bash and GNU AWK that combines GPG encryption with version control (Git by default) for secure password storage and change tracking. It stores encrypted password databases as GPG files and uses a revision control system to maintain a complete history of all changes, making it ideal for users who want both security and accountability in their password management. The tool provides a simple interface where users can search for passwords using `pwgrep searchstring` or edit the database directly with `pwgrep`, and it integrates with various AWK implementations and secure file deletion tools for cross-platform compatibility. -The implementation is remarkably simple - a single shell script that uses GNU AWK to parse the kernel's CPU information and format it into a clear, structured output. It's particularly useful for system administrators and developers who need to quickly understand CPU topology, especially on servers with multiple processors or complex threading configurations where the raw `/proc/cpuinfo` output can be overwhelming. +The implementation leverages GPG for strong encryption, ensuring passwords are never stored in plaintext, while the version control integration (typically Git over SSL/SSH) provides secure synchronization across multiple devices and maintains an audit trail of all database modifications. The project includes comprehensive Debian packaging support and creates multiple command aliases (pwedit, pwfadd, pwfdel, etc.) for different password management operations, making it a complete password management solution that prioritizes security, transparency, and ease of use for technical users comfortable with command-line tools. -[View on Codeberg](https://codeberg.org/snonux/cpuinfo) -[View on GitHub](https://github.com/snonux/cpuinfo) +[View on Codeberg](https://codeberg.org/snonux/pwgrep) +[View on GitHub](https://github.com/snonux/pwgrep) + +Shell from `bin/pwgrep.sh`: + +```AUTO +function findbin () { + local -r trylist=$1 + found="" + for bin in $trylist; do + if [ -z $found ]; then + which=$(which $bin) + [ ! -z $which ] && found=$bin + fi + done + + echo $found +} +``` --- @@ -1884,7 +1955,7 @@ The implementation is remarkably simple - a single shell script that uses GNU AW * 📊 Commits: 110 * 📈 Lines of Code: 614 * 📅 Development Period: 2011-02-05 to 2022-04-21 -* 🔥 Recent Activity: 4328.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4334.9 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🏷️ Latest Release: v1.4 (2022-04-29) @@ -1897,17 +1968,21 @@ The architecture centers around a modular plugin system where custom functionali [View on Codeberg](https://codeberg.org/snonux/perldaemon) [View on GitHub](https://github.com/snonux/perldaemon) -Perl from `lib/PerlDaemonModules/ExampleModule2.pm`: +Perl from `lib/PerlDaemon/RunModules.pm`: ```AUTO -sub new ($$$) { +sub new ($$) { my ($class, $conf) = @_; my $self = bless { conf => $conf }, $class; - $self->{counter} = 0; - return $self; -} + my $modulesdir = $conf->{'daemon.modules.dir'}; + my $logger = $conf->{logger}; + my %loadedmodules; + my %scheduler; + + if (-d $modulesdir) { + $logger->logmsg("Loading modules from $modulesdir"); ``` --- @@ -1920,7 +1995,7 @@ sub new ($$$) { * 📈 Lines of Code: 122 * 📄 Lines of Documentation: 10 * 📅 Development Period: 2011-01-27 to 2014-06-22 -* 🔥 Recent Activity: 4659.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4665.9 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: v0.2 (2011-01-27) @@ -1965,7 +2040,7 @@ function read_config_values(config_file) { * 📈 Lines of Code: 720 * 📄 Lines of Documentation: 6 * 📅 Development Period: 2008-06-21 to 2021-11-03 -* 🔥 Recent Activity: 4721.8 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 4728.6 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🏷️ Latest Release: v0.3 (2009-02-08) @@ -2011,6 +2086,46 @@ public SPrefs(Component parent, HashMap<String,String> options) { --- +### ychat + +* 💻 Languages: C++ (52.1%), C/C++ (21.3%), Shell (20.1%), HTML (2.5%), Config (2.1%), Perl (1.5%), Make (0.3%) +* 📚 Documentation: Text (100.0%) +* 📊 Commits: 67 +* 📈 Lines of Code: 33823 +* 📄 Lines of Documentation: 109 +* 📅 Development Period: 2008-05-15 to 2014-07-01 +* 🔥 Recent Activity: 5283.4 days (avg. age of last 42 commits) +* ⚖️ License: GPL-2.0 +* 🏷️ Latest Release: yhttpd-0.7.2 (2013-04-06) + +⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. + +Based on my analysis of the codebase, here's a concise summary of the yChat project: + +**yChat** is a web-based chat server written in C++ that functions as a standalone HTTP server without requiring external web server dependencies. It allows users to participate in multi-room chat sessions using standard web browsers, with no special client software needed. The system supports user registration, authentication via session IDs, customizable HTML templates, and multi-language support through XML configuration files. + +The architecture is built around several key managers: a socket manager for handling HTTP connections, a chat manager for core functionality, an HTML template manager for dynamic content generation, and a modular system supporting dynamically loadable command modules. It uses hash maps for efficient O(1) data retrieval, POSIX threads for concurrent request handling, and includes advanced features like SSL support, MySQL database integration, garbage collection for memory management, and comprehensive logging. The codebase also includes related projects like yhttpd (a lightweight HTTP server) and ycurses (a terminal interface library), making it a comprehensive communication platform designed for performance and extensibility. + +[View on Codeberg](https://codeberg.org/snonux/ychat) +[View on GitHub](https://github.com/snonux/ychat) + +C++ from `src/logd.cpp`: + +```AUTO + struct tm *t_m; + time_t t_cur = time(NULL); + t_m = gmtime(&t_cur); + + char c_buf[100]; + c_buf[99] = '\0'; + strftime(c_buf, 100, "[%d/%b/%Y:%H:%M:%S %z]", t_m); + + return string(c_buf); +} +``` + +--- + ### netcalendar * 💻 Languages: Java (83.0%), HTML (12.9%), XML (3.0%), CSS (0.8%), Make (0.2%) @@ -2019,7 +2134,7 @@ public SPrefs(Component parent, HashMap<String,String> options) { * 📈 Lines of Code: 17380 * 📄 Lines of Documentation: 947 * 📅 Development Period: 2009-02-07 to 2021-05-01 -* 🔥 Recent Activity: 5352.5 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 5359.3 days (avg. age of last 42 commits) * ⚖️ License: GPL-2.0 * 🏷️ Latest Release: v0.1 (2009-02-08) @@ -2036,39 +2151,40 @@ The implementation uses a clean separation of concerns with dedicated packages f [View on Codeberg](https://codeberg.org/snonux/netcalendar) [View on GitHub](https://github.com/snonux/netcalendar) -Java from `sources/client/inputforms/CreateNewEvent.java`: +Java from `sources/client/SplashScreen.java`: ```AUTO -private final static long serialVersionUID = 1L; +public class SplashScreen extends JWindow implements Runnable { + private static final long serialVersionUID = 1L; -private final static String[] labels = - { "Description: ", "Category: ", "Place: ", "Yearly: ", "Date: "}; -``` + public void run() { + JPanel jPanel = (JPanel)getContentPane(); + jPanel.setBackground(Color.BLACK); + jPanel.setForeground(Color.WHITE); ---- + int iWidth = 411; + int iHeight = 261; + Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); -### ychat + int x = (dimension.width-iWidth)/2; + int y = (dimension.height-iHeight)/2; + setBounds(x,y,iWidth,iHeight); -* 💻 Languages: C++ (54.9%), C/C++ (23.0%), Shell (13.8%), Perl (2.5%), HTML (2.5%), Config (2.3%), Make (0.8%), CSS (0.2%) -* 📚 Documentation: Text (100.0%) -* 📊 Commits: 67 -* 📈 Lines of Code: 67884 -* 📄 Lines of Documentation: 127 -* 📅 Development Period: 2008-05-15 to 2014-06-30 -* 🔥 Recent Activity: 5372.7 days (avg. age of last 42 commits) -* ⚖️ License: GPL-2.0 -* 🏷️ Latest Release: yhttpd-0.7.2 (2013-04-06) + JLabel jLabel = new JLabel(new ImageIcon("images/netcal.png")); + jPanel.add(jLabel, BorderLayout.CENTER); + jPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3)); + setVisible(true); -⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. + try { + Thread.sleep(3000); -Based on my analysis of the codebase, here's a concise summary of the yChat project: - -**yChat** is a web-based chat server written in C++ that functions as a standalone HTTP server without requiring external web server dependencies. It allows users to participate in multi-room chat sessions using standard web browsers, with no special client software needed. The system supports user registration, authentication via session IDs, customizable HTML templates, and multi-language support through XML configuration files. - -The architecture is built around several key managers: a socket manager for handling HTTP connections, a chat manager for core functionality, an HTML template manager for dynamic content generation, and a modular system supporting dynamically loadable command modules. It uses hash maps for efficient O(1) data retrieval, POSIX threads for concurrent request handling, and includes advanced features like SSL support, MySQL database integration, garbage collection for memory management, and comprehensive logging. The codebase also includes related projects like yhttpd (a lightweight HTTP server) and ycurses (a terminal interface library), making it a comprehensive communication platform designed for performance and extensibility. + } catch (Exception e) { + Main.infoMessage(e.getMessage()); + } -[View on Codeberg](https://codeberg.org/snonux/ychat) -[View on GitHub](https://github.com/snonux/ychat) + dispose(); + } +``` --- @@ -2078,7 +2194,7 @@ The architecture is built around several key managers: a socket manager for hand * 📊 Commits: 80 * 📈 Lines of Code: 601 * 📅 Development Period: 2009-11-22 to 2011-10-17 -* 🔥 Recent Activity: 5448.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 5454.9 days (avg. age of last 42 commits) * ⚖️ License: Custom License * 🧪 Status: Experimental (no releases yet) @@ -2091,46 +2207,23 @@ The implementation uses a clean separation of concerns with modules for IRC conn [View on Codeberg](https://codeberg.org/snonux/hsbot) [View on GitHub](https://github.com/snonux/hsbot) -Haskell from `HsBot/Plugins/PrintMessages.hs`: +Haskell from `HsBot/IRC/User.hs`: ```AUTO -module HsBot.Plugins.PrintMessages (makePrintMessages) where +module HsBot.IRC.User where -import HsBot.Plugins.Base +import List -import HsBot.Base.Env -import HsBot.Base.State +import HsBot.General.Render -printMessages :: CallbackFunction -printMessages str sendMessage env@(Env state _) = do - putStrLn $ (currentChannel state) ++ " " +data User = User { + userName :: String, + userMessages :: Int, + userPts :: Int ``` --- -### fype - -* 💻 Languages: C (72.1%), C/C++ (20.7%), HTML (5.7%), Make (1.5%) -* 📚 Documentation: Text (71.3%), LaTeX (28.7%) -* 📊 Commits: 99 -* 📈 Lines of Code: 10196 -* 📄 Lines of Documentation: 1741 -* 📅 Development Period: 2008-05-15 to 2021-11-03 -* 🔥 Recent Activity: 5609.9 days (avg. age of last 42 commits) -* ⚖️ License: Custom License -* 🧪 Status: Experimental (no releases yet) - -⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. - -**Fype** is a 32-bit scripting language interpreter written in C that aims to be "at least as good as AWK" while providing a different syntax and some unique features. Created by Paul C. Buetow as a fun project, Fype supports variables, functions, procedures, loops, arrays, and control structures with features like variable synonyms (references), nested functions/procedures, and automatic type conversion. The language uses a simple syntax with statements ending in semicolons and supports both global procedures (which share scope with their callers) and lexically-scoped functions. - -The implementation is built using a straightforward top-down parser with a maximum lookahead of 1 token, simultaneously parsing and interpreting code (meaning syntax errors are only detected at runtime). The architecture is modular with separate components for scanning/tokenization, symbol management, garbage collection, type conversion, and data structures (including arrays, lists, hash tables, stacks, and trees). The interpreter is designed for Unix-like systems (BSD/Linux) and includes built-in functions for I/O, math operations, bitwise operations, system calls like `fork`, and memory management with garbage collection. - -[View on Codeberg](https://codeberg.org/snonux/fype) -[View on GitHub](https://github.com/snonux/fype) - ---- - ### vs-sim * 📚 Documentation: Markdown (100.0%) @@ -2138,7 +2231,7 @@ The implementation is built using a straightforward top-down parser with a maxim * 📈 Lines of Code: 0 * 📄 Lines of Documentation: 7 * 📅 Development Period: 2008-05-15 to 2015-05-23 -* 🔥 Recent Activity: 5809.1 days (avg. age of last 42 commits) +* 🔥 Recent Activity: 5815.9 days (avg. age of last 42 commits) * ⚖️ License: No license found * 🏷️ Latest Release: v1.0 (2008-08-24) @@ -2150,3 +2243,40 @@ The implementation features a modular architecture with separate packages for co [View on Codeberg](https://codeberg.org/snonux/vs-sim) [View on GitHub](https://github.com/snonux/vs-sim) + +--- + +### fype + +* 💻 Languages: C (71.3%), C/C++ (20.6%), HTML (6.6%), Make (1.5%) +* 📚 Documentation: Text (60.2%), LaTeX (39.8%) +* 📊 Commits: 99 +* 📈 Lines of Code: 8906 +* 📄 Lines of Documentation: 1431 +* 📅 Development Period: 2008-05-15 to 2021-04-29 +* 🔥 Recent Activity: 5861.7 days (avg. age of last 42 commits) +* ⚖️ License: Custom License +* 🧪 Status: Experimental (no releases yet) + +⚠️ **Notice**: This project appears to be finished, obsolete, or no longer maintained. Last meaningful activity was over 2 years ago. Use at your own risk. + +**Fype** is a 32-bit scripting language interpreter written in C that aims to be "at least as good as AWK" while providing a different syntax and some unique features. Created by Paul C. Buetow as a fun project, Fype supports variables, functions, procedures, loops, arrays, and control structures with features like variable synonyms (references), nested functions/procedures, and automatic type conversion. The language uses a simple syntax with statements ending in semicolons and supports both global procedures (which share scope with their callers) and lexically-scoped functions. + +The implementation is built using a straightforward top-down parser with a maximum lookahead of 1 token, simultaneously parsing and interpreting code (meaning syntax errors are only detected at runtime). The architecture is modular with separate components for scanning/tokenization, symbol management, garbage collection, type conversion, and data structures (including arrays, lists, hash tables, stacks, and trees). The interpreter is designed for Unix-like systems (BSD/Linux) and includes built-in functions for I/O, math operations, bitwise operations, system calls like `fork`, and memory management with garbage collection. + +[View on Codeberg](https://codeberg.org/snonux/fype) +[View on GitHub](https://github.com/snonux/fype) + +C from `src/data/queue.c`: + +```AUTO + p_elem->type = type; + + return p_elem; +} + +_Bool +queue_empty(Queue *p_queue) { + if (p_queue == NULL) + return 0; +``` |
