Profile for zlatko

Header for zlatko
Avatar for zlatko
Display name
Panic In The Darkroom
Username
@zlatko@social.zlatko.dev
Role
admin

About zlatko

Bio

According to some, I'm avant-garde ;)

I try to stick to software development and engineering topics, often related to application development, but I also shitpost random stuff, occassionally about photography, (usually not more then) react to politics or economics.

My website is https://zlatko.dev but I less completely-infrequently post a photo or two to my photo gallery https://photos.zlatko.dev.

I also used to post at https://pixelfed.social/zlatko, and https://programming.dev/u/zlatko, and I'll occassionally swipe here and there.

Stats

Joined
Posts
2436
Followed by
163
Following
329

Recent posts

I created a small backup helper for my #gotosocial instance:

gitea.zlatko.dev/zlatko/gts-backup

I can use it directly with npm (you probably shouldn't, it's not very well tested):

npx gts-backup -p @zladuric/gts-backup -s /mnt/my-instance -d /mny/backup -u zlatko and it will copy the database, and all the media uploaded by me to the backup location.

In theory (and practice, as I've just tested), you can make that copy, point your GTS data volume to the new location, and things just keep working.

(#npm package here: www.npmjs.com/package/@zladuric/gts-backup)

Warning: unsafe, untested plus zero tests, and I have no idea if I'll ever write more code there. But maybe it'll inspire a proper backup tool somewhere down the line.

The problem I tried to solve with just regular GTS backup is you pull a lot of remote media, so backup of all that (unless you're running a "super serious" server) makes no sense and is exensive.

In light of social.zlatko.dev/@zlatko/statuses/01GJAMRC6AH9JS4F9VZFPF3GW5, I'm sorry, y'all :)

CC @gotosocial

Open thread at this post

Ubuntu 20.04 to 20.04 seems significantly more involved then os upgrades on Fedora, and between earlier Ubuntu upgrades. At least that's how I am remembering them. I assume it's at least partially because some stuff, like Firefox, now want to be snaps?

Grr I wish I could easily switch this laptop to Fedora.

#fedora #ubuntu
#linux #releaseUpgradeRant

Open thread at this post
Fediverse and selfhosting meta: I find that doing something stupid often makes us feel happy. Toggle visibility

I find that doing something stupid often makes us feel happy.

Steps to be stupid:

1. Be your own social network provider (host your own gotosocial instance)
2. Mess up a few attempts and end up with dangling 5 GB of files taken.
3. Try to remove the extra files to no avail, since they're not in the last instance of your database.
4. Well, find all the files you did NOT post yourself, and any other files older then one day.
5. Do it by this SQL in your db browser: CREATE TABLE files_to_remove as select file_path from media_attachments join accounts on accounts.id = media_attachments.account_id where account_id not in (select id from accounts where username like '%zlatko%') and media_attachments.created_at > '2022-10-21 17:12:02.997912+00:00'
6. now export that table to json.
7. Now in node_repl read up that json file.
8. Execute this: errors = 0; files.forEach(f => { try { fs.unlinkSync(f.file_path); } catch {errors++;} })
9. Find out that you only have hosted 30ish thousand federated photos, and you had about 10,000 extra from a previous attempt.
10. Don't worry, they're all gone now, even if the thumbnails aren't.


I love self-hosting shit. And big props to @gotosocial for making a straightforward table structure.

#gotosocial #selfhosted #fediverse #sysadmin #sqlite

Open thread at this post

I installed several things on my thing (like gitea, nginx with a bunch of subdomains etc) and never had issues. Now I added drone, again, no issues.

The first build of a npm-based project brought the server load to ~2. I thought I have an excuse to go to the second-lowest-specced hetzner instance (which just adds an extra vCPU) but it scaled back down within like 30 seconds.

Then I started my (somewhat forgotten and only-started-on-demand) keycloak container, meltdown :)

#docker #hetzner #keycloak #npm #drone #gitea

Open thread at this post

One of these days I'm really gonna have to go out and try emacs. I think I opened it like twice in the nineties maybe and decided to go vi(m), and I never tried it since. But I think it might be good for me if I did try.

These guys made an emacs fedi instance and are tooting from emacs:

emacs.ch/explore

Alternatively I'll just have to open a neovim instance or something.

#vi #vim #neovim #emacs #fanVSfan

Open thread at this post