summaryrefslogtreecommitdiff
path: root/about/showcase.html
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-09 10:52:12 +0300
committerPaul Buetow <paul@buetow.org>2025-07-09 10:52:12 +0300
commitbbbd384ff4315861837b8c0a2567b140135a6665 (patch)
tree609b915373cb27c2c42940715085bea8b3530df8 /about/showcase.html
parent7977ed56b2c17e9bbab1bbd3cab108919672b27b (diff)
Update content for html
Diffstat (limited to 'about/showcase.html')
-rw-r--r--about/showcase.html845
1 files changed, 547 insertions, 298 deletions
diff --git a/about/showcase.html b/about/showcase.html
index c9693f3f..97314213 100644
--- a/about/showcase.html
+++ b/about/showcase.html
@@ -102,7 +102,7 @@
<li>๐Ÿ“ˆ Lines of Code: 6241</li>
<li>๐Ÿ“„ Lines of Documentation: 2306</li>
<li>๐Ÿ“… Development Period: 2025-06-23 to 2025-07-09</li>
-<li>๐Ÿ”ฅ Recent Activity: 4.2 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 4.7 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: BSD-2-Clause</li>
<li>๐Ÿท๏ธ Latest Release: v0.4.0 (2025-07-09)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -115,15 +115,45 @@
<a class='textlink' href='https://codeberg.org/snonux/gitsyncer'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/gitsyncer'>View on GitHub</a><br />
<br />
-<span>Go from <span class='inlinecode'>internal/version/version.go</span>:</span><br />
+<span>Go from <span class='inlinecode'>internal/github/github.go</span>:</span><br />
<br />
<pre>
-var (
- Version = "0.4.0"
+func (c *Client) RepoExists(repoName string) (bool, error) {
+ if c.token == "" {
+ return false, fmt.Errorf("GitHub token required")
+ }
+
+ url := fmt.Sprintf("https://api.github.com/repos/%s/%s", c.org, repoName)
+ fmt.Printf(" Checking URL: %s\n", url)
+ fmt.Printf(" Token present: %v (length: %d)\n", c.token != "", len(c.token))
+
+ req, err := http.NewRequest("GET", url, nil)
+ if err != nil {
+ return false, err
+ }
+
+ req.Header.Set("Authorization", "Bearer "+c.token)
+ req.Header.Set("Accept", "application/vnd.github.v3+json")
+
+ resp, err := http.DefaultClient.Do(req)
+ if err != nil {
+ return false, err
+ }
+ defer resp.Body.Close()
- GitCommit = "unknown"
+ if resp.StatusCode == 200 {
+ return true, nil
+ } else if resp.StatusCode == 404 {
+ return false, nil
+ } else if resp.StatusCode == 401 {
+ body, _ := io.ReadAll(resp.Body)
+ fmt.Printf(" 401 Unauthorized - Response: %s\n", string(body))
+ fmt.Printf(" Authorization header: %s\n", req.Header.Get("Authorization"))
+ return false, fmt.Errorf("authentication failed (401): %s", string(body))
+ }
- BuildDate = "unknown"
+ return false, fmt.Errorf("unexpected status code: %d", resp.StatusCode)
+}
</pre>
<br />
<span>---</span><br />
@@ -137,7 +167,7 @@ var (
<li>๐Ÿ“ˆ Lines of Code: 873</li>
<li>๐Ÿ“„ Lines of Documentation: 135</li>
<li>๐Ÿ“… Development Period: 2025-06-25 to 2025-06-29</li>
-<li>๐Ÿ”ฅ Recent Activity: 12.3 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 12.7 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: BSD-2-Clause</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -150,22 +180,19 @@ var (
<a class='textlink' href='https://codeberg.org/snonux/timr'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/timr'>View on GitHub</a><br />
<br />
-<span>Go from <span class='inlinecode'>internal/timer/operations.go</span>:</span><br />
+<span>Go from <span class='inlinecode'>cmd/timr/main.go</span>:</span><br />
<br />
<pre>
-func GetRawStatus() (string, error) {
- state, err := LoadState()
- if err != nil {
- return "", fmt.Errorf("error loading state: %w", err)
+func main() {
+ if len(os.Args) &lt; 2 {
+ printUsage()
+ os.Exit(1)
}
- elapsed := state.ElapsedTime
- if state.Running {
- elapsed += time.Since(state.StartTime)
- }
+ var err error
+ var output string
- return fmt.Sprintf("%d", int(elapsed.Seconds())), nil
-}
+ switch os.Args[1] {
</pre>
<br />
<span>---</span><br />
@@ -179,7 +206,7 @@ func GetRawStatus() (string, error) {
<li>๐Ÿ“ˆ Lines of Code: 6160</li>
<li>๐Ÿ“„ Lines of Documentation: 162</li>
<li>๐Ÿ“… Development Period: 2025-06-19 to 2025-07-08</li>
-<li>๐Ÿ”ฅ Recent Activity: 12.7 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 13.1 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: BSD-2-Clause</li>
<li>๐Ÿท๏ธ Latest Release: v0.9.2 (2025-07-02)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -199,12 +226,36 @@ func GetRawStatus() (string, error) {
<span>Go from <span class='inlinecode'>internal/ui/handlers.go</span>:</span><br />
<br />
<pre>
-func (m *Model) getTaskAtCursor() *task.Task {
- cursor := m.tbl.Cursor()
- if cursor &lt; 0 || cursor &gt;= len(m.tasks) {
+func (m *Model) handleAnnotationMode(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
+ onEnter := func(value string) error {
+ if !m.replaceAnnotations &amp;&amp; strings.TrimSpace(value) == "" {
+ return fmt.Errorf("annotation cannot be empty")
+ }
+
+ if m.replaceAnnotations {
+ if err := task.ReplaceAnnotations(m.annotateID, value); err != nil {
+ return err
+ }
+ m.replaceAnnotations = false
+ } else {
+ if err := task.Annotate(m.annotateID, value); err != nil {
+ return err
+ }
+ }
+ m.reload()
return nil
}
- return &amp;m.tasks[cursor]
+
+ onExit := func() {
+ m.annotating = false
+ m.replaceAnnotations = false
+ }
+
+ model, cmd := m.handleTextInput(msg, &amp;m.annotateInput, onEnter, onExit)
+ if msg.Type == tea.KeyEnter &amp;&amp; m.annotateInput.Value() != "" {
+ return model, m.startBlink(m.annotateID, false)
+ }
+ return model, cmd
}
</pre>
<br />
@@ -219,7 +270,7 @@ func (m *Model) getTaskAtCursor() *task.Task {
<li>๐Ÿ“ˆ Lines of Code: 3947</li>
<li>๐Ÿ“„ Lines of Documentation: 854</li>
<li>๐Ÿ“… Development Period: 2021-12-28 to 2025-07-07</li>
-<li>๐Ÿ”ฅ Recent Activity: 20.0 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 20.4 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -250,7 +301,7 @@ TOP=20
<li>๐Ÿ“ˆ Lines of Code: 42772</li>
<li>๐Ÿ“„ Lines of Documentation: 159</li>
<li>๐Ÿ“… Development Period: 2021-04-29 to 2025-07-01</li>
-<li>๐Ÿ”ฅ Recent Activity: 26.3 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 26.8 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -263,14 +314,15 @@ TOP=20
<a class='textlink' href='https://codeberg.org/snonux/foo.zone'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/foo.zone'>View on GitHub</a><br />
<br />
-<span>HTML from <span class='inlinecode'>gemfeed/2022-01-23-welcome-to-the-foo.zone.html</span>:</span><br />
+<span>HTML from <span class='inlinecode'>notes/index.html</span>:</span><br />
<br />
<pre>
-&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
-&lt;title&gt;Welcome to the foo.zone&lt;/title&gt;
+&lt;title&gt;Notes on foo.zone&lt;/title&gt;
&lt;link rel="shortcut icon" type="image/gif" href="/favicon.ico" /&gt;
&lt;link rel="stylesheet" href="../style.css" /&gt;
&lt;link rel="stylesheet" href="style-override.css" /&gt;
@@ -289,7 +341,7 @@ TOP=20
<li>๐Ÿ“ˆ Lines of Code: 20091</li>
<li>๐Ÿ“„ Lines of Documentation: 5674</li>
<li>๐Ÿ“… Development Period: 2020-01-09 to 2025-06-20</li>
-<li>๐Ÿ”ฅ Recent Activity: 51.8 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 52.2 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Apache-2.0</li>
<li>๐Ÿท๏ธ Latest Release: v4.2.0 (2023-06-21)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -306,17 +358,18 @@ TOP=20
<a class='textlink' href='https://codeberg.org/snonux/dtail'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/dtail'>View on GitHub</a><br />
<br />
-<span>Go from <span class='inlinecode'>internal/clients/baseclient.go</span>:</span><br />
+<span>Go from <span class='inlinecode'>internal/io/fs/directprocessor.go</span>:</span><br />
<br />
<pre>
-func (c *baseClient) makeConnection(server string, sshAuthMethods []gossh.AuthMethod,
- hostKeyCallback client.HostKeyCallback) connectors.Connector {
- if c.Args.Serverless {
- return connectors.NewServerless(c.UserName, c.maker.makeHandler(server),
- c.maker.makeCommands())
+func NewDirectProcessor(processor LineProcessor, output io.Writer, globID
+ string, ltx lcontext.LContext) *DirectProcessor {
+ return &amp;DirectProcessor{
+ processor: processor,
+ output: output,
+ stats: &amp;stats{},
+ ltx: ltx,
+ sourceID: globID,
}
- return connectors.NewServerConnection(server, c.UserName, sshAuthMethods,
- hostKeyCallback, c.maker.makeHandler(server), c.maker.makeCommands())
}
</pre>
<br />
@@ -331,7 +384,7 @@ func (c *baseClient) makeConnection(server string, sshAuthMethods []gossh.AuthMe
<li>๐Ÿ“ˆ Lines of Code: 396</li>
<li>๐Ÿ“„ Lines of Documentation: 24</li>
<li>๐Ÿ“… Development Period: 2025-04-18 to 2025-05-11</li>
-<li>๐Ÿ”ฅ Recent Activity: 71.1 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 71.5 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿท๏ธ Latest Release: v1.0.0 (2025-05-11)</li>
</ul><br />
@@ -346,10 +399,12 @@ func (c *baseClient) makeConnection(server string, sshAuthMethods []gossh.AuthMe
<span>Ruby from <span class='inlinecode'>wireguardmeshgenerator.rb</span>:</span><br />
<br />
<pre>
-def priv = File.read(@privkey_path).strip
+def initialize(myself)
+ raise &#39;Wireguard tool not found&#39; unless system(&#39;which wg &gt; /dev/null 2&gt;&amp;1&#39;)
-def psk(peer)
- psk_path = "#{@psk_dir}/#{[@myself, peer].sort.join(&#39;_&#39;)}.key"
+ @myself = myself
+ @psk_dir = &#39;keys/psk&#39;
+ mykeys_dir = "keys/#{myself}"
</pre>
<br />
<span>---</span><br />
@@ -363,7 +418,7 @@ def psk(peer)
<li>๐Ÿ“ˆ Lines of Code: 9835</li>
<li>๐Ÿ“„ Lines of Documentation: 559</li>
<li>๐Ÿ“… Development Period: 2024-01-18 to 2025-06-14</li>
-<li>๐Ÿ”ฅ Recent Activity: 83.2 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 83.6 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -381,19 +436,13 @@ def psk(peer)
<a class='textlink' href='https://codeberg.org/snonux/ior'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/ior'>View on GitHub</a><br />
<br />
-<span>C from <span class='inlinecode'>internal/c/types.h</span>:</span><br />
+<span>C from <span class='inlinecode'>internal/c/maps.h</span>:</span><br />
<br />
<pre>
-struct open_event {
- __u32 event_type;
- __u32 trace_id;
- __u64 time;
- __u32 pid;
- __u32 tid;
- __s32 flags;
- char filename[MAX_FILENAME_LENGTH];
- char comm[MAX_PROGNAME_LENGTH];
-};
+struct {
+ __uint(type, BPF_MAP_TYPE_RINGBUF);
+ __uint(max_entries, 1 &lt;&lt; 24);
+} event_map SEC(".maps");
</pre>
<br />
<span>---</span><br />
@@ -407,7 +456,7 @@ struct open_event {
<li>๐Ÿ“ˆ Lines of Code: 25762</li>
<li>๐Ÿ“„ Lines of Documentation: 3101</li>
<li>๐Ÿ“… Development Period: 2008-05-15 to 2025-06-27</li>
-<li>๐Ÿ”ฅ Recent Activity: 84.4 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 84.9 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -422,14 +471,24 @@ struct open_event {
<a class='textlink' href='https://codeberg.org/snonux/ds-sim'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/ds-sim'>View on GitHub</a><br />
<br />
-<span>Java from <span class='inlinecode'>src/main/java/events/VSAbstractEvent.java</span>:</span><br />
+<span>Java from <span class='inlinecode'>src/main/java/core/VSTaskManager.java</span>:</span><br />
<br />
<pre>
-public final void setClassname(String eventClassname) {
- if (eventClassname.startsWith(CLASS_PREFIX))
- eventClassname = eventClassname.substring(CLASS_PREFIX_LENGTH);
+private VSSimulatorVisualization simulatorVisualization;
+
+private PriorityQueue&lt;VSTask&gt; globalTasks;
+
+private LinkedList&lt;VSTask&gt; fullfilledProgrammedTasks;
+
+public final static boolean PROGRAMMED = true;
+
+public final static boolean ONLY_ONCE = false;
- this.eventClassname = eventClassname;
+private VSPrefs prefs;
+
+public VSTaskManager(VSPrefs prefs,
+ VSSimulatorVisualization simulatorVisualization) {
+ init(prefs, simulatorVisualization);
}
</pre>
<br />
@@ -444,7 +503,7 @@ public final void setClassname(String eventClassname) {
<li>๐Ÿ“ˆ Lines of Code: 33</li>
<li>๐Ÿ“„ Lines of Documentation: 3</li>
<li>๐Ÿ“… Development Period: 2025-04-03 to 2025-04-03</li>
-<li>๐Ÿ”ฅ Recent Activity: 97.0 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 97.4 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -475,7 +534,7 @@ func main() {
<li>๐Ÿ“ˆ Lines of Code: 3967</li>
<li>๐Ÿ“„ Lines of Documentation: 411</li>
<li>๐Ÿ“… Development Period: 2024-05-04 to 2025-06-12</li>
-<li>๐Ÿ”ฅ Recent Activity: 113.9 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 114.4 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿท๏ธ Latest Release: v1.0.0 (2025-03-04)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -492,16 +551,29 @@ func main() {
<a class='textlink' href='https://codeberg.org/snonux/gos'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/gos'>View on GitHub</a><br />
<br />
-<span>Go from <span class='inlinecode'>internal/summary/summary.go</span>:</span><br />
+<span>Go from <span class='inlinecode'>internal/config/args.go</span>:</span><br />
<br />
<pre>
-func prepare(content string) string {
- content = newlineRegex.ReplaceAllString(content, " ")
- content = urlRegex.ReplaceAllString(content, "")
- content = multiSpaceRegex.ReplaceAllString(content, " ")
- content = strings.TrimSpace(content)
- content = tagRegex.ReplaceAllString(content, "`$0`")
- return content
+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) &gt; 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
+ }
+ }
+ return nil
}
</pre>
<br />
@@ -516,7 +588,7 @@ func prepare(content string) string {
<li>๐Ÿ“ˆ Lines of Code: 1299</li>
<li>๐Ÿ“„ Lines of Documentation: 154</li>
<li>๐Ÿ“… Development Period: 2023-01-02 to 2025-07-07</li>
-<li>๐Ÿ”ฅ Recent Activity: 133.5 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 133.9 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -531,10 +603,15 @@ func prepare(content string) string {
<span>Perl from <span class='inlinecode'>foostats.pl</span>:</span><br />
<br />
<pre>
-my sub parse_date ( $year, @line ) {
- my $timestr = "$line[0] $line[1]";
- return Time::Piece-&gt;strptime( $timestr, &#39;%b %d&#39; )
- -&gt;strftime("$year%m%d");
+sub write ( $path, $content ) {
+ open my $fh, &#39;&gt;&#39;, "$path.tmp"
+ or die "\nCannot open file: $!";
+ print $fh $content;
+ close $fh;
+
+ rename
+ "$path.tmp",
+ $path;
}
</pre>
<br />
@@ -549,7 +626,7 @@ my sub parse_date ( $year, @line ) {
<li>๐Ÿ“ˆ Lines of Code: 1373</li>
<li>๐Ÿ“„ Lines of Documentation: 48</li>
<li>๐Ÿ“… Development Period: 2024-12-05 to 2025-02-28</li>
-<li>๐Ÿ”ฅ Recent Activity: 137.7 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 138.1 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -561,14 +638,16 @@ my sub parse_date ( $year, @line ) {
<a class='textlink' href='https://codeberg.org/snonux/rcm'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/rcm'>View on GitHub</a><br />
<br />
-<span>Ruby from <span class='inlinecode'>lib/dsl.rb</span>:</span><br />
+<span>Ruby from <span class='inlinecode'>lib/dslkeywords/notify.rb</span>:</span><br />
<br />
<pre>
-def to_s = @id
-def evaluate! = @scheduled.each(&amp;:evaluate!)
+def notify(message = nil, &amp;block)
+ return unless @conds_met
-def &lt;&lt;(obj)
- raise DuplicateResource, "#{obj.id} already declared!" if @@objs.key?(obj.id)
+ n = Notify.new(message.nil? ? &#39;&#39; : message)
+ n.message(n.instance_eval(&amp;block)) if block
+ self &lt;&lt; n
+ n
</pre>
<br />
<span>---</span><br />
@@ -582,7 +661,7 @@ def &lt;&lt;(obj)
<li>๐Ÿ“ˆ Lines of Code: 2253</li>
<li>๐Ÿ“„ Lines of Documentation: 1170</li>
<li>๐Ÿ“… Development Period: 2021-05-21 to 2025-06-11</li>
-<li>๐Ÿ”ฅ Recent Activity: 230.5 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 230.9 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: GPL-3.0</li>
<li>๐Ÿท๏ธ Latest Release: 3.0.0 (2024-10-01)</li>
</ul><br />
@@ -594,18 +673,17 @@ def &lt;&lt;(obj)
<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/gemtexter'>View on GitHub</a><br />
<br />
-<span>Shell from <span class='inlinecode'>lib/md.source.sh</span>:</span><br />
+<span>Shell from <span class='inlinecode'>lib/log.source.sh</span>:</span><br />
<br />
<pre>
-md::make_img () {
- local link="$1"; shift
- local descr="$1"; shift
-
- if [ -z "$descr" ]; then
- echo "[![$link]($link)]($link) "
- else
- echo "[![$descr]($link \"$descr\")]($link) "
- fi
+log () {
+ local -r level="$1"; shift
+ local message
+
+ for message in "$@"; do
+ echo "$message"
+ done | log::_pipe "$level" $$
+}
</pre>
<br />
<span>---</span><br />
@@ -619,7 +697,7 @@ md::make_img () {
<li>๐Ÿ“ˆ Lines of Code: 917</li>
<li>๐Ÿ“„ Lines of Documentation: 33</li>
<li>๐Ÿ“… Development Period: 2024-01-20 to 2025-07-06</li>
-<li>๐Ÿ”ฅ Recent Activity: 447.7 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 448.1 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: MIT</li>
<li>๐Ÿท๏ธ Latest Release: v0.0.3 (2025-07-06)</li>
</ul><br />
@@ -641,13 +719,16 @@ md::make_img () {
func createPreferenceWindow(a fyne.App) fyne.Window {
window := a.NewWindow("Preferences")
directoryPreference := widget.NewEntry()
- directoryPreference.SetText(a.Preferences().StringWithFallback("Directory", defaultDirectory))
+ directoryPreference.SetText(a.Preferences().StringWithFallback("Directory",
+ defaultDirectory))
tagDropdownPreference := widget.NewEntry()
- tagDropdownPreference.SetText(a.Preferences().StringWithFallback("Tags", strings.Join(defaultTagItems, ",")))
+ tagDropdownPreference.SetText(a.Preferences().StringWithFallback("Tags",
+ strings.Join(defaultTagItems, ",")))
whatDropdownPreference := widget.NewEntry()
- whatDropdownPreference.SetText(a.Preferences().StringWithFallback("Whats", strings.Join(defaultWhatItems, ",")))
+ whatDropdownPreference.SetText(a.Preferences().StringWithFallback("Whats",
+ strings.Join(defaultWhatItems, ",")))
window.SetContent(container.NewVBox(
container.NewVBox(
@@ -688,7 +769,7 @@ func createPreferenceWindow(a fyne.App) fyne.Window {
<li>๐Ÿ“ˆ Lines of Code: 12</li>
<li>๐Ÿ“„ Lines of Documentation: 3</li>
<li>๐Ÿ“… Development Period: 2024-03-24 to 2024-03-24</li>
-<li>๐Ÿ”ฅ Recent Activity: 471.5 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 471.9 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -726,7 +807,7 @@ aws: build
<li>๐Ÿ“ˆ Lines of Code: 2850</li>
<li>๐Ÿ“„ Lines of Documentation: 52</li>
<li>๐Ÿ“… Development Period: 2023-08-27 to 2025-04-05</li>
-<li>๐Ÿ”ฅ Recent Activity: 501.5 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 502.0 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: MIT</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -738,17 +819,16 @@ aws: build
<a class='textlink' href='https://codeberg.org/snonux/terraform'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/terraform'>View on GitHub</a><br />
<br />
-<span>HCL from <span class='inlinecode'>org-buetow-ecs/variables.tf</span>:</span><br />
+<span>HCL from <span class='inlinecode'>org-buetow-elb/remotestates.tf</span>:</span><br />
<br />
<pre>
- type = bool
- default = false
-}
-
-variable "deploy_audiobookshelf" {
- description = "Deploy Audio Bool Shelf Server?"
- type = bool
- default = true
+data "terraform_remote_state" "base" {
+ backend = "s3"
+ config = {
+ bucket = "org-buetow-tfstate"
+ key = "org-buetow-base/terraform.tfstate"
+ region = "eu-central-1"
+ }
}
</pre>
<br />
@@ -763,7 +843,7 @@ variable "deploy_audiobookshelf" {
<li>๐Ÿ“ˆ Lines of Code: 1096</li>
<li>๐Ÿ“„ Lines of Documentation: 287</li>
<li>๐Ÿ“… Development Period: 2023-04-17 to 2025-06-12</li>
-<li>๐Ÿ”ฅ Recent Activity: 514.4 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 514.8 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿท๏ธ Latest Release: v1.1.0 (2024-05-03)</li>
<li>๐Ÿค– AI-Assisted: This project was partially created with the help of generative AI</li>
@@ -778,26 +858,34 @@ variable "deploy_audiobookshelf" {
<a class='textlink' href='https://codeberg.org/snonux/gogios'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/gogios'>View on GitHub</a><br />
<br />
-<span>Go from <span class='inlinecode'>internal/run.go</span>:</span><br />
+<span>Go from <span class='inlinecode'>internal/notify.go</span>:</span><br />
<br />
<pre>
-func persistReport(subject, body string, conf config) error {
- reportFile := fmt.Sprintf("%s/report.txt", conf.StateDir)
- tmpFile := fmt.Sprintf("%s.tmp", reportFile)
-
- f, err := os.Create(tmpFile)
- if err != nil {
- return err
+func notify(conf config, subject, body string) error {
+ if conf.SMTPDisable {
+ log.Println("Notification disabled")
+ return nil
}
- defer f.Close()
+ log.Println("notify", subject, body)
- if _, err = f.WriteString(fmt.Sprintf("%s\n\n", subject)); err != nil {
- return err
+ headers := map[string]string{
+ "From": conf.EmailFrom,
+ "To": conf.EmailTo,
+ "Subject": subject,
+ "MIME-Version": "1.0",
+ "Content-Type": "text/plain; charset=\"utf-8\"",
}
- if _, err = f.WriteString(body); err != nil {
- return err
+
+ header := ""
+ for k, v := range headers {
+ header += fmt.Sprintf("%s: %s\r\n", k, v)
}
- return os.Rename(tmpFile, reportFile)
+
+ message := header + "\r\n" + body
+ log.Println("Using SMTP server", conf.SMTPServer)
+
+ return smtp.SendMail(conf.SMTPServer, nil, conf.EmailFrom,
+ []string{conf.EmailTo}, []byte(message))
}
</pre>
<br />
@@ -812,7 +900,7 @@ func persistReport(subject, body string, conf config) error {
<li>๐Ÿ“ˆ Lines of Code: 32</li>
<li>๐Ÿ“„ Lines of Documentation: 3</li>
<li>๐Ÿ“… Development Period: 2023-12-31 to 2023-12-31</li>
-<li>๐Ÿ”ฅ Recent Activity: 555.1 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 555.5 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -850,7 +938,7 @@ run: build
<li>๐Ÿ“ˆ Lines of Code: 29</li>
<li>๐Ÿ“„ Lines of Documentation: 3</li>
<li>๐Ÿ“… Development Period: 2023-08-13 to 2024-01-01</li>
-<li>๐Ÿ”ฅ Recent Activity: 648.3 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 648.7 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: MIT</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -874,7 +962,8 @@ all:
docker build -t anki-sync-server:latest .
aws:
docker build -t anki-sync-server:latest .
- docker tag anki-sync-server:latest 634617747016.dkr.ecr.eu-central-1.amazonaws.com/anki-sync-server:latest
+ docker tag anki-sync-server:latest
+ 634617747016.dkr.ecr.eu-central-1.amazonaws.com/anki-sync-server:latest
</pre>
<br />
<span>---</span><br />
@@ -888,7 +977,7 @@ aws:
<li>๐Ÿ“ˆ Lines of Code: 1525</li>
<li>๐Ÿ“„ Lines of Documentation: 15</li>
<li>๐Ÿ“… Development Period: 2023-04-17 to 2023-11-19</li>
-<li>๐Ÿ”ฅ Recent Activity: 700.4 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 700.9 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -900,33 +989,24 @@ aws:
<a class='textlink' href='https://codeberg.org/snonux/gorum'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/gorum'>View on GitHub</a><br />
<br />
-<span>Go from <span class='inlinecode'>internal/notifier/email.go</span>:</span><br />
+<span>Go from <span class='inlinecode'>internal/server/server.go</span>:</span><br />
<br />
<pre>
-func (em email) send(conf config.Config) error {
- if !conf.EmailNotifycationEnabled() {
- return nil
- }
- log.Println("notify:", em.subject, em.body)
-
- headers := map[string]string{
- "From": conf.EmailFrom,
- "To": conf.EmailTo,
- "Subject": em.subject,
- "MIME-Version": "1.0",
- "Content-Type": "text/plain; charset=\"utf-8\"",
- }
+func Start(ctx context.Context, conf config.Config, quo quorum.Quorum) {
+ go func() {
+ for {
+ log.Println("server: starting")
+ if err := runServer(ctx, conf, quo); err != nil {
+ log.Println("server:", err)
+ }
- header := ""
- for k, v := range headers {
- header += fmt.Sprintf("%s: %s\r\n", k, v)
- }
-
- message := header + "\r\n" + em.body
- log.Println("Using SMTP server", conf.SMTPServer)
-
- return smtp.SendMail(conf.SMTPServer, nil, conf.EmailFrom,
- []string{conf.EmailTo}, []byte(message))
+ select {
+ case &lt;-time.After(time.Second):
+ case &lt;-ctx.Done():
+ return
+ }
+ }
+ }()
}
</pre>
<br />
@@ -941,7 +1021,7 @@ func (em email) send(conf config.Config) error {
<li>๐Ÿ“ˆ Lines of Code: 51</li>
<li>๐Ÿ“„ Lines of Documentation: 26</li>
<li>๐Ÿ“… Development Period: 2022-06-02 to 2024-04-20</li>
-<li>๐Ÿ”ฅ Recent Activity: 765.2 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 765.6 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -975,7 +1055,7 @@ declare -i NUM_PAGES_TO_EXTRACT=42 # This is the answear!
<li>๐Ÿ“ˆ Lines of Code: 41</li>
<li>๐Ÿ“„ Lines of Documentation: 17</li>
<li>๐Ÿ“… Development Period: 2020-01-30 to 2025-04-30</li>
-<li>๐Ÿ”ฅ Recent Activity: 1058.7 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 1059.1 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: GPL-3.0</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -1010,7 +1090,7 @@ declare -r SCREEN=eDP-1
<li>๐Ÿ“ˆ Lines of Code: 342</li>
<li>๐Ÿ“„ Lines of Documentation: 39</li>
<li>๐Ÿ“… Development Period: 2011-11-19 to 2022-04-02</li>
-<li>๐Ÿ”ฅ Recent Activity: 1278.3 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 1278.7 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿท๏ธ Latest Release: 0.5.0 (2022-02-21)</li>
</ul><br />
@@ -1053,7 +1133,7 @@ scalephotos () {
<li>๐Ÿ“ˆ Lines of Code: 1728</li>
<li>๐Ÿ“„ Lines of Documentation: 18</li>
<li>๐Ÿ“… Development Period: 2020-07-12 to 2023-04-09</li>
-<li>๐Ÿ”ฅ Recent Activity: 1429.5 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 1429.9 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Custom License</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -1066,12 +1146,21 @@ scalephotos () {
<a class='textlink' href='https://codeberg.org/snonux/algorithms'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/algorithms'>View on GitHub</a><br />
<br />
-<span>Go from <span class='inlinecode'>sort/parallelquick.go</span>:</span><br />
+<span>Go from <span class='inlinecode'>queue/elementarypriority.go</span>:</span><br />
<br />
<pre>
-func ParallelQuick[V ds.Number](a ds.ArrayList[V]) ds.ArrayList[V] {
- parallelQuick(a)
- return a
+func (q *ElementaryPriority[T]) DeleteMax() T {
+ if q.Empty() {
+ return 0
+ }
+
+ ind, max := q.max()
+ for i := ind + 1; i &lt; q.Size(); i++ {
+ q.a[i-1] = q.a[i]
+ }
+ q.a = q.a[0 : len(q.a)-1]
+
+ return max
}
</pre>
<br />
@@ -1086,7 +1175,7 @@ func ParallelQuick[V ds.Number](a ds.ArrayList[V]) ds.ArrayList[V] {
<li>๐Ÿ“ˆ Lines of Code: 671</li>
<li>๐Ÿ“„ Lines of Documentation: 19</li>
<li>๐Ÿ“… Development Period: 2018-05-26 to 2025-01-21</li>
-<li>๐Ÿ”ฅ Recent Activity: 1431.2 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 1431.7 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -1121,7 +1210,7 @@ def out(message, prefix, flag = :none)
<li>๐Ÿ“ˆ Lines of Code: 51</li>
<li>๐Ÿ“„ Lines of Documentation: 69</li>
<li>๐Ÿ“… Development Period: 2014-03-24 to 2022-04-23</li>
-<li>๐Ÿ”ฅ Recent Activity: 1910.4 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 1910.8 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿงช Status: Experimental (no releases yet)</li>
</ul><br />
@@ -1154,7 +1243,7 @@ sub hello() {
<li>๐Ÿ“Š Commits: 95</li>
<li>๐Ÿ“ˆ Lines of Code: 195</li>
<li>๐Ÿ“… Development Period: 2013-03-22 to 2023-03-09</li>
-<li>๐Ÿ”ฅ Recent Activity: 2125.5 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 2125.9 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿท๏ธ Latest Release: v1.0.0 (2023-04-29)</li>
</ul><br />
@@ -1170,11 +1259,14 @@ sub hello() {
<span>Raku from <span class='inlinecode'>guprecords.raku</span>:</span><br />
<br />
<pre>
-sub do-it(Str:D \stats-dir, Reporter:D \reporter) {
- my Aggregator \aggregator .= new;
- aggregator.add-file($_) for dir(stats-dir, test =&gt; { /.records$/ });
- reporter.aggregates = aggregator.aggregates;
- reporter.report;
+method add-file(IO::Path:D $file is readonly) {
+ my Str $host = $file.IO.basename.split(&#39;.&#39;).first;
+
+ die "Record file for {$host} already processed - duplicate inputs?"
+ if %!aggregates&lt;host&gt;{$host}:exists;
+ %!aggregates&lt;host&gt;{$host} = HostAggregate.new($host);
+
+ for $file.IO.lines -&gt; Str $line { self!add-line(:$line, :$host) }
}
</pre>
<br />
@@ -1189,7 +1281,7 @@ sub do-it(Str:D \stats-dir, Reporter:D \reporter) {
<li>๐Ÿ“ˆ Lines of Code: 12420</li>
<li>๐Ÿ“„ Lines of Documentation: 610</li>
<li>๐Ÿ“… Development Period: 2018-03-01 to 2020-01-22</li>
-<li>๐Ÿ”ฅ Recent Activity: 2451.9 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 2452.3 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: Apache-2.0</li>
<li>๐Ÿท๏ธ Latest Release: 0.5.1 (2019-01-04)</li>
</ul><br />
@@ -1204,6 +1296,20 @@ sub do-it(Str:D \stats-dir, Reporter:D \reporter) {
<a class='textlink' href='https://codeberg.org/snonux/ioriot'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/ioriot'>View on GitHub</a><br />
<br />
+<span>C from <span class='inlinecode'>ioriot/src/opcodes.h</span>:</span><br />
+<br />
+<pre>
+typedef enum {
+ FSTAT = 0,
+ FSTAT_AT,
+ FSTATFS,
+ FSTATFS64,
+ LSTAT,
+ STAT,
+ STATFS,
+ STATFS64,
+</pre>
+<br />
<span>---</span><br />
<br />
<h3 style='display: inline' id='staticfarm-apache-handlers'>staticfarm-apache-handlers</h3><br />
@@ -1215,7 +1321,7 @@ sub do-it(Str:D \stats-dir, Reporter:D \reporter) {
<li>๐Ÿ“ˆ Lines of Code: 919</li>
<li>๐Ÿ“„ Lines of Documentation: 12</li>
<li>๐Ÿ“… Development Period: 2015-01-02 to 2021-11-04</li>
-<li>๐Ÿ”ฅ Recent Activity: 2960.6 days (avg. age of last 42 commits)</li>
+<li>๐Ÿ”ฅ Recent Activity: 2961.1 days (avg. age of last 42 commits)</li>
<li>โš–๏ธ License: No license found</li>
<li>๐Ÿท๏ธ Latest Release: 1.1.3 (2015-01-02)</li>
</ul><br />
@@ -1228,13 +1334,13 @@ sub do-it(Str:D \stats-dir, Reporter:D \reporter) {
<a class='textlink' href='https://codeberg.org/snonux/staticfarm-apache-handlers'>View on Codeberg</a><br />
<a class='textlink' href='https://github.com/snonux/staticfarm-apache-handlers'>View on GitHub</a><br />
<br />
-<span>Perl from <span class='inlinecode'>src/StaticFarm/API.pm</span>:</span><br />
+<span>Perl from <span class='inlinecode'>debian/staticfarm-apache-handlers/usr/share/staticfarm/apache/handlers/StaticFarm/CacheControl.pm</span>:</span><br />
<br />
<pre>
-sub path_ls {
- my $f = shift;
+sub my_warn {
+ my $msg = shift;
- return [ map { s#.*/##; $_ } glob("$f/*") ];
+ Apache2::ServerRec::warn("CacheControl: $msg");
}
</pre>
<br />
@@ -1249,7 +1355,7 @@ sub path_ls {
<li>๐Ÿ“ˆ Lines of Code: 18</li>
<li>๐Ÿ“„ Lines of Documentation: 49</li>
<li>๐Ÿ“… Development Period: 2014-03-24 to 2021-11-05<