Libove Blog

Personal Blog about anything - mostly programming, cooking and random thoughts

#

#TIL Set your Content-Type header correctly when sending #ActivityPub messages. #Lemmy will 404 on any inbox if the header is not correct (actually just if it doesn't start with application/



#

https://programming.dev/post/21133764

Stop actively looking for "things to program". Spend time in other hobbies than programming and eventually you will stumble over problems you can solve with programming.

If you want to build games, maybe build clones of games you like, but start simple! Build Tetris, not World of Warcraft.


#

https://programming.dev/post/21199936

I've tried this quickly and you can use pango markup to change the text color in the label.

Here is a snippet with a label and a button that changes the text color from blue to red.

    let label = Label::builder().label("<span foreground=\"blue\">Blue text</span>").build();
    label.set_use_markup(true);
    tool_box.append(&label.clone());
    let button = Button::builder().label("Change").build();
    button.connect_clicked(move |button| {
        println!("Moved");
        label.set_label("<span foreground=\"red\">Red text</span>");
    });
    tool_box.append(&button.clone());

#rust #gtk #gkt-rs




#

The current #AI hype shows the deep disregard of some people for craftsmanship.

They don't say it out loud but I read a lot of variations of "nobody really wants to write code, you want to build application" or "nobody wants to draw, you want to create art" in the last months.



#

#owlblogs doesn't have any user documentation yet. I want to change this but am conflicted between two approaches.

  1. Setup a typical documentation system (e.g. mkDocs) and document everything there.

  2. Integrate the documentation into the software, adding help pages served beside the blog.

#documentation #docs #dev


#

Some crawlers try to use the (non-existing) #Mastodon API of my blog, since my blog supports #ActivityPub.

Most don't send a User-Agent or use the generic user-agent of the library they use.

"/api/nodeinfo"
"/api/v1/config"
"/api/v1/directory?limit=1"
"/api/v1/instance"
"/api/v1/instance/activity"
"/api/v1/instance/domain_blocks"
"/api/v1/instance/peers"
"/api/v1/streaming/public"
"/api/v1/timelines/public?limit=100"
"/api/v1/timelines/public?limit=40"
"/api/v3/federated_instances"