Spyke

Posts

Created an opensource registry of content creators: Creator's Yellowbook

I just started collecting data about content creators and wanted a quick an easy way to find a content creator's socials.

There are websites that collect this data but you have to pay to access it for some reason. That made me unhappy, so here we are. A crappy-looking but functional website.

Pagefind makes the frontend-only search possible.

https://notavailable.codeberg.page/cryb/Open linkView original on programming.dev
1
programming·ProgrammingbyTheOfficial

PoC - Use Matrix instead of emails for logins

I wrote a proof of concept that allows the user to sign up to a service using their matrix ID e.g @user:server.test. The user then receives an activation link in an encrypted room from the service. It worked quite easily and within 2 days of fumbling around with the matrix SDK in python and FastAPI, here we are.

This has been in my head for a while and I just wanted to see if it's possible (the proof is in the pudding code). Emails are insecure and national services are starting to implement communication services on top of matrix. It's a not inconceivable that citizens might get a government issued Matrix account and communicate safely with the government over a secure protocol. Why not allow other services to do the same?

Imagine if instead of providing your email address for signing up to services you used matrix instead. Your host wouldn't be able to read your messages and it could replace things like 2FA codes over SMS, activation links in emails, or health documents from your doctor's CMS in your email inbox.

Should there be enough time, I'd like to try and contribute this login method to forgejo (the software behind codeberg that's hosting this repository), but let's see. First it would take learning go 😅

PoC - Use Matrix instead of emails for loginshttps://codeberg.org/notavailable/matrix-loginOpen linkView original on programming.dev
101

[Solved] How can I make scrollable sidebar that grows with its contents?

Solution: the scrollable container was also scrollable horizontally! I had to disable that and it finally expanded to the size of its contents.

Hi,

I found out Godot can be (ab)used to make a cross platform GUIs for applications and would like to make a window with a main container on the left and scrollable feed on the right. The scrollable feed should expand horizontally (max 20% of available space) depending on the size of the contents it has.

I've split the main GUI using an HBoxContainer with a VBoxContainer on the left (mainContainer) and a ScrollContainer (feedScroll) on the right with a VBoxContainer in that. When setting "Expand = true" on mainContainer, it just pushes aside the feedScroll which then has width of 0. The buttons have a min size, so I expected them to widen the vBoxContainer and succeedingly the feedScroll. Alas, the VBoxContainer does have the right width (as you can see in the image), but the feedScroll doesn't have a width.

Below is the scene.

::: spoiler gui.tscn

[gd_scene load_steps=3 format=3 uid="uid://c1jga0ql8cbyx"]

[ext_resource type="Script" uid="uid://ceyrteq5kukei" path="res://button.gd" id="1_80edf"]

[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_k6omp"]

[node name="gui" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="rootMargin" type="MarginContainer" parent="."]
material = SubResource("CanvasItemMaterial_k6omp")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="HBoxContainer" type="HBoxContainer" parent="rootMargin"]
layout_mode = 2

[node name="mainContent" type="VBoxContainer" parent="rootMargin/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="feedScroll" type="ScrollContainer" parent="rootMargin/HBoxContainer"]
layout_mode = 2

[node name="VBoxContainer" type="VBoxContainer" parent="rootMargin/HBoxContainer/feedScroll"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 10

[node name="Button" type="Button" parent="rootMargin/HBoxContainer/feedScroll/VBoxContainer"]
custom_minimum_size = Vector2(200, 30)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
text = "I have a lot of text"
script = ExtResource("1_80edf")

[node name="Button2" type="Button" parent="rootMargin/HBoxContainer/feedScroll/VBoxContainer"]
layout_mode = 2
text = "This is a marginal text"

[node name="Button3" type="Button" parent="rootMargin/HBoxContainer/feedScroll/VBoxContainer"]
layout_mode = 2
text = "I have more text in here"

[node name="Button4" type="Button" parent="rootMargin/HBoxContainer/feedScroll/VBoxContainer"]
layout_mode = 2
text = "Quite a big button lad"

[connection signal="pressed" from="rootMargin/HBoxContainer/feedScroll/VBoxContainer/Button" to="rootMargin/HBoxContainer/feedScroll/VBoxContainer/Button" method="_on_pressed"]

:::

Help would be appreciated. Thanks

View original on programming.dev
32

You reached the end