rochacbruno

@rochacbruno@hachyderm.io

I code :python_logo: at :redhat: for Ansible.
I am a PSF Fellow
I maintain dynaconf.com
I like :rust:
I am plant based 🌱
I use :arch_linux: btw

Viana do Castelo 🇵🇹 | from 🇧🇷 | 🍉

My posts are mainly in English and occasionally in Portuguese.

Here I share mostly about #python #rust #freesoftware #django #fastapi #flask #ansible #dynaconf #kde #tootfinder

This profile is from a federated server and may be incomplete. Browse more on the original instance.

rochacbruno, to random

1 day running my Mastodon instance on a tiny 2GB VPS and here are some stats.

Storage: 6.5GB of public media (posts and profile images)

Downscaled to 6 workers (from 25)

Normal usage:
RAM: 1.2 GB of average allocation
CPU: Average 77% always in use

Peaks (accounts import, large amount of interactions)
RAM: 90%
SWAP: 1GB
CPU 101% (htop shows that impossible number for a 1vCPU machine)

rochacbruno,

Looks like it is really loaded, but working, thanks to sidekiq and its retries.

Traffic usage and peak times
CPU Usage

rochacbruno,

Right now my main concern is the storage, because I only have more 4.5GB of disk space and looks like it is going to eat my disk very soon.

And I still want to do backups.

rochacbruno,

@andrelop does it cleanup only external accounts media or also excludes your own media?

I wanted to have my own media safe and cleanup only from other people.

santiago, (edited ) to random
@santiago@masto.lema.org avatar

I suspect Mastodon.social will end up like socialist parties in Europe: start up as an actual threat to capitalism, then progressively “open its mind” to the market.

Next time you look they have a head of FMI as candidate for a presidential election and then later just get dissolved into irrelevance.

rochacbruno,

@cadusilva @santiago se isso acontecer é mais provavel que ele faça na instância dele apenas e que comece a ter funcionalidades com Dual Business License, ou seja, implementar funcionalidades PRO na instância dele.

Acho que os forks do próprio mastodon vão continuar evoluindo, tipo o Glitch

rochacbruno,

@cadusilva @santiago
quem sabe um fork que substitua o sidekiq com outro sistema de filas

rochacbruno,

@santiago @cadusilva Isso é o que o pessoal do gotosocial esta fazendo, mas ainda tem chão para funcionar bem.

anze3db, to random
@anze3db@fosstodon.org avatar

After trying to create an account and spin up an instance on the largest EU cloud provider I understand why nobody uses EU cloud providers.

rochacbruno,

@anze3db I recently did it on OVH and also got the 48h message but they delivered everything in about 3 hours.

rochacbruno,

@anze3db not sure that is the case, but when signing up I had to fill up a Data Processing Agreement, looks like if that is not sent they are legally not able to keep hosting the services.

I heard about other mastodon big instances that had problems like this, the document was missing and their account was simply deleted and their servers and data gone.

rochacbruno, to Blog

Please recommend me technical blogs that you like to read, blogs focused on content, text, coding, readability in any language.

#blog

rochacbruno, to random

I had to downscale sideqik to 6 workers to be able to execute mastodon on a 2GB/1vCPU machine.

It is working nice for a single user, I did some stress testing.

The system runs mastodon (no ES), wordpress, Yunohost admin.

The current usage is 1/2 of the RAM under 100 concurrent connections.

This is an experiment to see if It is possible to have single user mastodon on a 1€ VPS.

rochacbruno, to til

: Do not use your root domain name to test federated software, once you federate your domain is registered across multiple instances and relays, there is no way to rollback, you can't reuse that same domain with a different implemention, and even reinstalling the same service might break if you change the keys.

I locked my domain name to Mastodon 🤦‍♂️

rochacbruno,

Always use a subdomain to deploy mastodon (or any other federated service)

You can put redirects on webfinger to have a shorter handle, but the real ID will be the subdomain, so you are free to change later.

E.g:

@me points to @me

In future it will be possible to deploy another service and change the nginx redirect

@me -> @me

Learned from:

https://docs.gotosocial.org/en/latest/advanced/host-account-domain/

rochacbruno,

Also: Mastodon has a self-destruct command, if you ever decide to move away from mastodon for your instance, instead of just shutting down, run the self-destruct from tootctl.

This command will send a message to all federated servers to cleanup their caches and references.

duran, to random Portuguese
@duran@bolha.one avatar

Aquele cantor que ao mesmo tempo é um cachorro e uma divindade:
O Snoopy God

rochacbruno,

@duran
E uma distribuição Linux
https://snoopgod.com/

gutocarvalho, to random Portuguese
@gutocarvalho@bolha.us avatar

já que ninguem foi lá e fez o linkedinho fediversal, quem sabe nozes anima.

rochacbruno,

@gutocarvalho eu estava pensando nisso esses dias

treyhunner, to python
@treyhunner@mastodon.social avatar

Name an operation in #Python that DOES NOT rely on 1 or more dunder methods.

I can think of 1 off the top of my head. If you can think of 2 operations, you get a ⭐ (I don't know how to give a high five through a computer).

rochacbruno,

@treyhunner

Identity check with is operator,
Variable assignment with =

rochacbruno, to KDE Portuguese

Teaching my 5 years old son what functions are and how to declare one, I am impressed that after 6 tries he was able to it by himself.

#KDE #Gcompris is an amazing piece of #freesoftware

It runs on Linux, Windows, Mac and Android.

More than 100 education activities.

Gcompris running on Android with the function learning game.

dariel, to random Portuguese

Alguém pode indicar alternativas para o YouTube?

PS: não reparem, mas como estou conhecendo o que há fora do que as Big Techs oferecem, ainda tenho muitas dúvidas!

rochacbruno,

@dariel as 2 instâncias peertube que tenho mais acessado

https://tilvids.com/ (para conteúdo EN)

https://bolha.tube (para conteúdo BR)

O ecossistema peertube ainda é novo, não tem tanto conteúdo mas está crescendo, eu to me planejando para fazer conteúdo exclusivo na bolha.tube!
c/c @gutocarvalho

rochacbruno, to KDE

Everyday I like more the #KDE ecosystem.

One of the things I like the most on using #Konqueror as a browser is that it has support for multiple independent splits, it means I can have different zoom applied to the same site across splits.

rochacbruno, to python

It is disappointing that TypedDict doesn't support setting default values.

from typing import TypedDict

class Con(TypedDict):  
 host: str  
 port: int = 9090

data = {"host": "test.com"}  
connection = Con(**data)  

I expected it to give me "port": 9090 by default but it does not!

Looks like building the dict as instance of Con doesn't make any difference than just building a {} and that is very confusing.

rochacbruno,

@nedbat I wanted to type a function that accepts a dictionary as argument, I can't change it to dataclass, I wish I could use something like Pydantic to de-serialize the dict, but it is an old project, I added the type annotation just to make the code more clear.

rochacbruno,

@diazona @cpontvieux @nedbat

main.py:7: error: Right hand side values are not supported in TypedDict [misc]

https://mypy-play.net/?mypy=latest&python=3.12&gist=9d035560071b873bbcb9efc08c510d7b

rochacbruno, to KDE

#KDE Kate Editor on all Platforms - 2024

https://cullmann.io/posts/kate-on-all-platforms-2024/

rochacbruno, to random Portuguese

Na próxima semana vamos fazer uma live na LINUXtips para falar sobre Fediverso, ActivityPub e Mastodon.

A ideia é tentar descomplicar, superficialmente o funcionamento disso aqui.

Alguém que tenha experieência em manter instancia, seja com moderação ou infra se voluntaria para participar?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • Durango
  • ethstaker
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • Leos
  • osvaldo12
  • tacticalgear
  • cubers
  • cisconetworking
  • anitta
  • provamag3
  • modclub
  • mdbf
  • GTA5RPClips
  • tester
  • megavids
  • normalnudes
  • lostlight
  • All magazines