« Back

Blog

Here is my small, simple micro-blog about my personal life. I will share everything from what I learned, my experience with technology and other daily struggles. I'm keeping it lite and straightforward. You can follow what I post here using my RSS feed.

Mechanical Keyboard ASMR.

I never thought I would say that sentence, but I uploaded something to my Soundcloud.

Mechanical keyboard ASMR.

Filewatcher in Golang

I wrote a little tool in Golang to move files from directory 'a' to 'b'

I had a task today where, among other things, I had to keep moving files from one folder to another. After doing it 5 times, I wanted to automate it with fsnotify/fsnotify.

func main() {
	srcDir := "path/to/a"
	destDir := "path/to/b"

	watcher, err := fsnotify.NewWatcher()
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	defer watcher.Close()

	done := make(chan bool)
	go func() {
		for {

			event, ok := <-watcher.Events
			if !ok {
				return
			}
			if event.Op.String() == "CREATE" {
				log.Println("[event] ", event)
				newPath := destDir + filepath.Base(event.Name)
				err := os.Rename(event.Name, newPath)
				if err != nil {
					log.Fatal(err)
				}
			}
		}
	}()
	err = watcher.Add(srcDir)
	if err != nil {
		log.Fatal(err)
	}
	<-done
}

Winter is here

I think winter is now officially here.

Walking in the Winter Wonderland
Walking in the Winter Wonderland.

URL in C

An interesting C puzzle I read weeks ago, maybe you might find it amusing.

Did you know that URLs are a valid syntactic element in C? Maybe the syntax highlighting will give you a hint :)

#include <stdio.h>

int main()
{
    https://wildauer.io/
    printf("hello, world\n");
    return 0;
}
~  gcc hello.c -o hello && ./hello
hello, world

The code compiles and runs successfully, because https: is a label and // following begins a comment.

Color scheme

I wanted a new color scheme for this page. I tried some generators but in the end, I used 4-5 different colors I liked on other pages.

I'm microblogging

Some weeks ago, I started microblogging here. At first it was just an experiment, but I like it and I think I am going to stick with it.

Ouddorp

Brouwersdam Strand

Ouddorp

I grew up here

There is a trend on Twitter where people post screenshots of their childhood games with the words "I grew up here". Here is mine.

Legend of Zelda
The Legend of Zelda, published in 1986 for the Nintendo Entertainment System

OWO - A fuzzy string transformer written in Golang.

Huohhhh. fuwwy stwing twansfowmew ;3

Read more »

Unicode block

Sometimes when I’m bored, I put � in online forms, just because I know that somewhere in the world a developer is about to go crazy.