Tomas Vik

Posts

Fixing goreleaser error: failed to publish artifacts .. already_exists

TL;DR: If you have the same issue as I did, then you are not restricting the goreleaser action to tags, and you trigger the same release from the main branch and the git tag. Today I tried to release a new version of godu and the release action failed 💥. ⨯ release failed after 2m18s error=scm releases: failed to publish artifacts: failed to upload godu_1.4.0_Linux_arm64.tar.gz after 1 tries: POST https://uploads.github.com/repos/viktomas/godu/releases/83296480/assets?name=godu_1.4.0_Linux_arm64.tar.gz: 422 Validation Failed [{Resource:ReleaseAsset Field:name Code:already_exists Message:}] After some searching, I found this GitHub issue [Bug]: publishing multiple artifacts broken, which explained the problem.

Go: range is like a function call

When I watched Ultimate Go Programming today, I learned about an unintuitive Go programming language behaviour. I’m going to show you. Have a look at the following code and tell me what will be printed in the console: arr := [...]string{"Hello", "you", "handsome", "person"} fmt.Printf("before: %q\n", arr[1]) for i, v := range arr { // at the very first iteration we change second word: you -> from arr[1] = "from" if i == 1 { // second iteration, we print the value of second word from range fmt.

I wrote a command line tool to export Logseq pages as blog posts

I’ve got an exciting little program to share with you. It’s a command line utility that exports your public Logseq pages into Markdown blog posts compatible with most of the static-site generators. All you have to do is write your post in Logseq, run the logseq-extractor command with a few parameters and your blog has got the latest version of your post, ready for publishing. Two weeks ago, I looked for this very program but couldn’t find it.

Improve your Logseq notes with MermaidJS diagrams

In this post, I’ll show you how to quickly draw diagrams in Logseq with a few lines MermaidJS code.

Promises reduce your future choices

When you promise to do something, you make the present more easy-going. You also set yourself up for working on a task that you would rather not do, maybe it is not enjoyable, or maybe there’s something more important to do.

My thoughts on investing: Index fund is all you need

I wish I thought about investing when I was younger. The sooner you start, the better. In this article, I’ll explain my thought process about investing in and hopefully, I will help you think about money more efficiently.

Zettelkasten note-taking after one year

I’ve been taking small, permanent, densely-linked notes for over a year. Now I’ll share how my understanding of the Zettelkasten (aka Slip-box) method changed and what I’ve learned. 16 months ago, I wrote a popular post about Zettelkasten right after reading the How to Take Smart Notes book. I’ve been taking smart notes since then. This is my update.

Why are salaries so low

Is there a link between our compensation and how much value your work creates? I think that reward is disconnected from the value provided.

Insurance is like gambling, don't overdo it

Insurance companies, like betting companies, need high margins to keep operating. You are paying that margin.

CSS Week 3 - Display, Position, and Boxing-model

Display and position are complex CSS properties. Combined with the boxing model, they are foundation for the major layout methods.