💾 Archived View for kota.nz › code captured on 2023-01-29 at 02:13:51. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-06-03)

-=-=-=-=-=-=-

kota.nz

code

Aotearoa Tides

A cute little app that displays tidal data using the LINZ tide predictions. It works completely offline for ports all around the country.

nilsu

A modern pubnix for friends and family. Currently hosting several services including a Matrix server, Minecraft server, and websites for our members. I've also written various projects for nilsu.

Matrix

gemgen

Command line tool for converting Commonmark Markdown to Gemtext. The goal is to create proper hand-made gemtext. Links and "autolinks" are placed below each paragraph, but a "paragraph" of only links is left intact. Normally, paragraphs are merged onto a single line, but hardlinks (double spaces or \ at the end of a line) may be used for manual line breaks. Lists and headings are simplified to the gemtext format, emphasis markings are removed (or kept with the -e flag), horizontal rules are turned into 80 character lines, and indented code is converted to the gemtext "fenced" format.

jotto

Wordle/jotto for your terminal! Uses the official wordle word list, answer list, and defaults to the daily wordle for your local time. You can play older or newer wordles by passing the number as an argument. Your results are automatically copied into your clipboard using the same format as wordle.

notabar

Notabar is a tool and simple csv syntax. It's used to format and display the output of several programs in a notification. I use it instead of a system bar.

[image] notabar screenshot

colorswap

Reads from STDIN, looking for HEX color codes or RGB color codes. It will swap all occurences in each line to the other type. It prints the modified files to STDOUT.

timer

A basic countdown timer. I also wrote a script, tea which plays a sound and displays a notification when the timer finishes. It'll even unmute your speakers (and remute later) if needed.

tea

timer 25s
timer 11:32AM
timer 19:20
timer 3h40m50s

snowy trees

Minecraft mod that improves the look of snowy forests by generating snow under the trees.

[image] snowy trees screenshot

better chainmail

Minecraft mod that makes chainmail armour better. Chainmail armour is uncraftable and rather difficult to obtain in Minecraft, but is worse than iron armour making it pretty much useless. This mod buffs the armour such that it's similar, but slightly different than diamond.

better horses

Minecraft mod that replaces the horse breeding algorithm. The default algorithm takes the stats from both parents and a 3rd random horse and combines them and then divides by 3. This has the somewhat realistic effect of making is exponentially harder to breed better horses, but it's quite awful from a gameplay perspective. This mod instead creates the child horse with stats averaged from the parents and then applies linear variation to each stat and finally clamps it between the min/max values in vanilla Minecraft. It's still quite a feat to get a "perfect" horse, but at least now it's a goal you can work towards.

mclist

Minecraft server listing cli tool.

$ mclist example.com
example.com:25565:
Server: 1.18.1
Protocol: 757
Description: example 1.18 survival
Players: 1/20
- [Villager] a05deec0-7a0e-4076-87cb-dc5dcaca8586
Delay: 190.189512ms

mcoffline

Convert minecraft username or whole server to offline-mode version.

mcoffline k0taa
mcoffline whitelist.json

metweather

A little CLI tool to display weather information for Metservice. I created this and a Go library, metservice-go, so that I could have weather info for Aotearoa in my notification.

Metservice

metservice-go

tide

A command line program that prints Aotearoa's tidal data. It reads the official CSV files from LINZ and uses their provided algorithm to calculate the current tide height. If run in an interactive terminal it will also print out a basic graph.

LINZ

[image] tide screenshot

pcf

A simple ftp-based pastebin server and client. Uses a static webserver, ftp, sha1, and a filewatcher such as incron. In addition to the server spec + scripts, I wrote a basic command line client in go (although you can always use an ftp client and sha1sum instead). Someday, I might add sftp support for easier private server use.

basic command line client

modget

A package manager for Minecraft CurseForge mods. It kinda works right now, but is missing several important features... listen, working with curseforge's undocumented API isn't pleasant.

CurseForge

dprint

Print specified values from desktop files to stdout. Look, it's hard to describe okay? Here's a picture of me using it with my dmenu fork.

dmenu fork

[image] dprint screenshot

My launcher script pipes the output of dprint into dmenu to get a selection. Then it passes that selection into dprint -- with some options -- and then the output of that is executed by your shell (to launch the program).

#!/bin/sh
SELECTION=$(dprint | dmenu -i -l 8 "$@")
echo "Name:$SELECTION" | dprint -i - -o "StripExec" | ${SHELL:-"/bin/sh"} &

I wrote dprint because the default dmenu_run script just lists all the programs in your $PATH exactly as they're named. So, there's no easy way to rename them or tweak launch options. For example, that "calculator" program in the screenshot runs st -t st-float -g 76x30 -e python, and I renamed "ncmpcpp" to just "music."

calculator

black-pastel

A black background vim color-scheme. It's really just a slight fork of base16's default-dark, but I think it turned out nice.

base16's

[image] black-pastel screenshot

kota-prompt

My vi-mode zsh prompt. I unironically use vi-mode. There are literally dozens of us.

I think one of the big sticking points for people is that by default in bash or zsh there's virtually no current mode indicator. You just have to remember, I guess? This prompt is just your current path with /home/username replaced with ~ and it turns blue if you're in normal mode or red if your last command exited non-zero. Simple. Effective.

tabstore

Store your opened Firefox tabs in a plain text file for later restoration. A friend and I wrote this little extension back in 2017 after Firefox quantum came out and there were no plugins around to do this. Very useful for downloading a huge list of youtube videos (with youtube-dl -a) or sending a shopping list to a friend. It still works fine, but fair warning, I don't really use Firefox anymore. I wrote about tabstore in more detail.

tabstore in more detail

wal_steam

A python script that patches Metro for Steam with colors from wal or wpg. Steam has been slowly removing theming support so it's not quite what it once was. These days I try to by my games on itch, humble, or gog to more directly support Indie game developers. So wal_steam is in maintenance mode.

Metro for Steam

wal

wpg

itch

humble

gog

[image] wal_steam screenshot