2024-06-19 01:08:05 +04:00
package web
import "net/http"
2024-09-14 18:36:08 +04:00
import "github.com/invopop/ctxi18n/i18n"
2024-06-19 01:08:05 +04:00
import "git.arav.su/Arav/dwelling-home/pkg/util"
templ Stuff(r *http.Request) {
{{ gitSite := util.GetServiceByHost(r.Host, util.ServiceGit) }}
2024-09-15 16:15:57 +04:00
@base(i18n.T(ctx, "base.section.stuff"), i18n.T(ctx, "stuff.description"), "articles, programs, personal projects, own music", "/stuff", r, nil) {
<p class="center">{ i18n.T(ctx, "stuff.text") }</p>
2024-06-19 01:08:05 +04:00
<section id="articles">
2024-09-15 16:15:57 +04:00
<h2>{ i18n.T(ctx, "stuff.article.h") }</h2>
2024-06-19 01:08:05 +04:00
<table>
<tr>
2024-09-15 16:15:57 +04:00
<th>{ i18n.T(ctx, "stuff.article.tabh-lu") }</th>
<th>{ i18n.T(ctx, "stuff.article.tabh-nm") }</th>
2024-06-19 01:08:05 +04:00
</tr>
for _, entry := range Metadata {
<tr>
<td>
2024-09-15 16:15:57 +04:00
<time datetime={ entry.Date.Format("2006-01-02") }>{ entry.Date.Format("02.01.2006") }</time>
2024-06-19 01:08:05 +04:00
</td>
<td>
<a href={ templ.URL(entry.URL) }>{ entry.Title }</a>
</td>
</tr>
}
</table>
</section>
<section id="programs-scripts">
2024-09-15 16:15:57 +04:00
<h2>{ i18n.T(ctx, "stuff.progs") }</h2>
2024-06-19 01:08:05 +04:00
<table>
<tr>
<td><b>mccl</b></td>
2024-09-15 16:20:25 +04:00
<td>0.1.2 (14.12.2023)</td>
2024-06-19 01:08:05 +04:00
<td>Go</td>
<td>GPLv3</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/mccl") }>source</a>
<a href={ templ.URL(gitSite + "/Arav/mccl/releases") }>releases</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>A console Minecraft launcher. Take a look at README.md for explanation.</p>
</td>
</tr>
<tr>
<td><b>httpr</b></td>
2024-09-15 16:20:25 +04:00
<td>0.3.2 (20.09.2023)</td>
2024-06-19 01:08:05 +04:00
<td>Go</td>
<td>MIT</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/httpr") }>source</a>
<a href={ templ.URL(gitSite + "/Arav/httpr/releases") }>releases</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>A simple HTTP router that supports having both regular and parametrised path's parts at the same level, like <code>/assets/*filepath</code> and <code>/:a/:b</code> with the same HTTP method.</p>
<p>Yeah, not as efficient as httprouter is, but in my case no performance loose was noticed (on a small amount of paths). Yet I gained prettiness because it allowed me, for example, to ditch <code>/f/</code> part and leave just <code>/:hash/:name</code> instead of <code>/f/:hash/:name</code> in a dwelling-upload service.</p>
</td>
</tr>
<tr>
<td><b>justguestbook</b></td>
2024-09-15 16:20:25 +04:00
<td>1.3.2 (22.05.2023)</td>
2024-06-19 01:08:05 +04:00
<td>Go</td>
<td>MIT</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/justguestbook") }>source</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>A simple guestbook with owner's replies implementation made into a library.</p>
</td>
</tr>
<tr>
<td><b>justcaptcha</b></td>
2024-09-15 16:20:25 +04:00
<td>2.1.0 (12.08.2023)</td>
2024-06-19 01:08:05 +04:00
<td>Go</td>
<td>MIT</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/justcaptcha") }>source</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>A simple CAPTCHA implementation.</p>
</td>
</tr>
<tr>
<td><b>kwh-cost</b></td>
2024-09-15 16:20:25 +04:00
<td>1.1.3 (21.05.2024)</td>
2024-06-19 01:08:05 +04:00
<td>C</td>
<td>MIT+NIGGER</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/kwh-cost") }>source</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>KWh cost calculator in C.</p>
</td>
</tr>
<tr>
<td><b>httpprocprobed</b></td>
2024-09-15 16:20:25 +04:00
<td>3.2.0 (7.07.2024)</td>
2024-06-19 01:08:05 +04:00
<td>Go</td>
<td>MIT+NIGGER</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/httpprocprobed") }>source</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>It returns a list of processes and if they are running in a JSON format via HTTP GET request on <code>/processes</code> endpoint. Under the hood it searches in a /proc/ directory. It is being used on about page to show wether service's running or not.</p>
</td>
</tr>
<tr>
<td><b>ScrapTheChan</b></td>
2024-09-15 16:20:25 +04:00
<td>0.5.0 (3.05.2021)</td>
2024-06-19 01:08:05 +04:00
<td>Python</td>
<td>MIT</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/ScrapTheChan") }>source</a>
<a href={ templ.URL(gitSite + "/Arav/ScrapTheChan/releases") }>releases</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>Imageboards file scraper using theirs JSON API. Currently supported: 4chan.org, lainchan.org, 2ch.hk and 8kun.top.</p>
</td>
</tr>
<tr>
<td><b>OpenNIC active domains extraction script</b></td>
2024-09-15 16:20:25 +04:00
<td>10.07.2020</td>
2024-06-19 01:08:05 +04:00
<td>Bash</td>
<td>MIT</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/opennic-extract-domains") }>source</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>Bash script for BIND9 that extracts domains from zone files of OpenNIC and forms a list of domains that have an IP-address.</p>
</td>
</tr>
<tr>
<td><b>PiggyBank</b></td>
2024-09-15 16:20:25 +04:00
<td>1.0.0 (8.07.2020)</td>
2024-06-19 01:08:05 +04:00
<td>Python</td>
<td>MIT</td>
<td>
<a href={ templ.URL(gitSite + "/Arav/PiggyBank") }>source</a>
<a href={ templ.URL(gitSite + "/Arav/PiggyBank/releases") }>releases</a>
</td>
</tr>
<tr>
<td colspan="5">
<p>A program to help you to keep track of your piggy bank. A simple script I once wrote that I rewrote and made into a package just to learn how to do it.</p>
</td>
</tr>
</table>
</section>
<section id="music">
2024-09-15 16:15:57 +04:00
<h2>{ i18n.T(ctx, "stuff.music.h") }</h2>
<p>{ i18n.T(ctx, "stuff.music.text-1") } <a href={ templ.URL(util.GetServiceByHost(r.Host, util.ServiceFiles) + "/music/My%20tracks,%20that%20survived/") }>{ i18n.T(ctx, "stuff.music.text-2") }</a>.</p>
2024-06-19 01:08:05 +04:00
</section>
}
}