5 Followers
60 Following
78 Posts
Sysadmin, software engineer, and dungeon docent. I also dabble in music and digital drawing.
Githubhttps://github.com/therealfakemoot/

TIL there is a proposal in Go to allow database/sql queries to extract values into a struct, similar to how encoding/json or encoding/xml do value unmarshaling. Promising.

https://github.com/golang/go/issues/61637

#golang

proposal: database/sql: add methods to scan an entire row into one value · Issue #61637 · golang/go

Edited: struct field names are matched to columns case-sensitively. Edited: untouched storage is ignored rather than zeroed. I propose adding the method ScanRow(dest any) error to the Row and Rows ...

GitHub
Just be nice when possible, and weird when you can get away with it

I've released a new project aimed at headless management of your #Obsidian vault, currently named obsidian-pipeline: https://github.com/therealfakemoot/obsidian-pipeline

I started working on this because I've got a Drone pipeline that watches commits to my vault and does a few things with it, mostly publishing to my blog.

I wanted to launch with a unique flagship feature, though: JSONSchema validation.

Using the validate subcommand, you can programmatically guarantee that your notes pass certain degrees of quality control. This can short-circuit publishing pipelines or act as a local aide, possibly set to run at set intervals

I've tried to justify the efforts a bit better here on my blog ( https://blog.ndumas.com/2023/06/validating-yaml-frontmatter-with-jsonschema/ )

Coming soon will be moving files and renaming all their associated links, dedicated hugo modules, and more.

This project is wholly written in #golang and it would behoove me to give a shoutout to someone who's doing the exact same thing as me: https://github.com/Yakitrak/obsidian-cli

GitHub - therealfakemoot/obsidian-pipeline: Headless management of your Obsidian vault

Headless management of your Obsidian vault . Contribute to therealfakemoot/obsidian-pipeline development by creating an account on GitHub.

GitHub

Ever wanted your help output to have a little more polish and pop? My project this week has been integrating two popular #golang libraries: Charm's Lipgloss and Cobra.

Here's a screencast of my first draft: https://asciinema.org/a/Hyk4epQZiPjjzLTO1MvmuMzaZ

My initial goal was the have lipgloss automatically handle wrapping text, and that works pretty well. There's some ugly corner cases, and this is absolutely not a finished product, but I haven't seen anyone else publicly take a swing at this.

Code is here https://github.com/therealfakemoot/lipgloss-cobra-demo and a long-form walkthrough of how everything gets wired together can be found here https://blog.ndumas.com/2023/05/integrating-cobra-and-lipgloss/

untitled

Recorded by nickdumas

asciinema.org

If you're blogging with #ObsidianMD or otherwise using it to create content being ingested by #hugo to build a website, this might help out.

I've created a small Templater script that will inject a {{< figure >}} shortcode into your note.

I implemented this because I wanted to make sure my rich media embeds were handled responsively and had accessibility aides attached.

https://github.com/therealfakemoot/obsidian-hugo-figure-template

GitHub - therealfakemoot/obsidian-hugo-figure-template: A Templater script and template to insert a Hugo figure shortcode linked to one of the document's linked attachments.

A Templater script and template to insert a Hugo figure shortcode linked to one of the document's linked attachments. - GitHub - therealfakemoot/obsidian-hugo-figure-template: A Templater scrip...

GitHub

Testing out open-source analytics with Plausible ( https://github.com/plausible/analytics ) on my self-hosted stuff.

Not enough to justify a full blog-post, just some really cool groundwork.

#webdev #analytics #oss

GitHub - plausible/analytics: Simple, open source, lightweight and privacy-friendly web analytics alternative to Google Analytics.

Simple, open source, lightweight and privacy-friendly web analytics alternative to Google Analytics. - plausible/analytics

GitHub

it only took ~six hours to get an RSS feed link displaying on my site

#hugo #webdev #rss

/quartz  19 hugo  1    git commit -m "Am I the problem?"
[hugo 9daa953] Am I the problem?
1 file changed, 1 insertion(+), 1 deletion(-)

#hugo #webdev

Spent my evening working on my blog. An objective I've had in mind is adding some polish to my "series" ( groups of posts about a specific project or topic ).

#hugo has builtin support for this via its Taxonomies feature so I had a strong foundation. The real trick was understanding Hugo's lookup priorities, I suppose.

The short version is that Taxonomies contain terms. If you want to modify how the landing page for your series looks ( e.g. `/series/blogging-with-quartz/` ), the template you want is `layouts/_default/term.html`.

To compose content for your term pages, create `content/series/blogging-with-quartz/_index.md`. Make sure to give it frontmatter, this is a "Page" just like any other Markdown file in the `content/` directory.

For more details, check out the shiny new series page!

https://blog.ndumas.com/series/blogging-with-quartz/

#quartz #webdev

blogging-with-quartz

form and function

I've been working on more #golang stuff: https://blog.ndumas.com/notes/mapping-aardwolf-with-graphviz/

I'm using #graphviz to render rooms and the connections between them in #aardwolf

It's a just a proof of concept, there's going to be a lot of edge cases to deal with: the graph of rooms and their exits is definitely not planar, so projecting it flat will take some massaging.

Mapping Aardwolf with Graphviz and Golang

Textual Cartography Aardwolf has a fairly active developer community, people who write and maintain plugins and try to map the game world and its contents.