I WANT THE MELTING POT TO GRIND MY ANCESTRAL LINE INTO FRIVOLOUS POWDER 🇲🇩🇲🇩🇲🇩🇲🇩🇲🇩🇲🇦🇲🇦🇲🇦🇲🇦🇲🇦🇲🇦🇲🇦

  • 3 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: July 10th, 2023

help-circle




  • Okay, you may not gonna like it but I rented a 1TB storage box from Hetzner for 3 euros a month, just to get that foot off my neck. It’s omega cheap and mountable via CIFS so life is good for now. I’m still interested in what I described in the OP, and I even started scribbling some Python, but I’m too scared of fucking anything up as of now.

    The annoying part in writing that script was discovering that the filenames on disk don’t match the filenames in the URLs. E.g., given this URL:
    https://lemmy.org.il/pictrs/image/e6a0682b-d530-4ce8-9f9e-afa8e1b5f201.png. You’d expect that somewhere inside volumes/pictrs you’d find e6a0682b-d530-4ce8-9f9e-afa8e1b5f201.png, right…? So that’s not how it works, the filenames are of the exact same format but they don’t match.

    So my plan was to find non-local posts from the post table, check whether the thumbnail_url column starts with lemmy.org.il (assuming that means my instance cached it), then finding the file by downloading it via the URL and scanning the pictrs directory for files that match the exact size in bytes of the downloaded files. Once found, compare their checksums to be sure it’s the same one, then delete it and delete its post entry in the database.

    When get close to 1TB I’ll get back here for this idea… :P








  • Love me some systemd timers. Much more fun than cron.

    • Sane handling of environment variables with EnvironmentFile=
    • Out of the box logging. Especially useful is the ability to journalctl -f to watch long-running processes, which I’m not sure whether possible with cron
    • The ability to trigger the service manually rather than setting the timer to * * * * *, then forgetting it’s supposed to run in a minute, get distracted, come back in 15 minutes

    My only complaint is it’s a bit verbose. I’d rather have it as an option inside the .service file. The .timer requires some boilerplate like [Unit].description (it… uh… triggers a service. that’s the description), and WantedBy=timers.target. But these are small prices to pay







  • You nailed it, it only pulls posts from communities that someone on your instance subbed to. It doesn’t even pull retroactively; your instance only starts pulling posts created after the first subscriber on the instance subbed.

    I’m more concerned regarding media, because just like Mastodon, the pics themselves are copied from other instances onto yours. I hope it will be enough to just find -mtime -delete once in a while





  • Oh there’s an --exec flag as well? That’s great. This seems like a totally viable solution for cases where the crux of the container is a small script, with a handful of decision branches so the surface area to cover is manageable, but it also needs to come in a non-alpine distro because I assume that’s the hefty part that we’re like to remove. But that’s just off the top of my head, I’m sure there’s more. It’s genuinely a good idea and it deserves a respectful README as well :(


  • It ptraces the main container process and cuts off unused files. It also fires some customizable HTTP requests to trigger any dynamically loading libraries. Clever idea. If I understand correctly, the problems that arise to me are:

    1. Undoubtedly some essential files will be omitted. Unless my image consists merely of scratch and an executable, I can’t imagine myself successfully covering all edge cases.
    2. What about files that aren’t loaded by HTTP requests?

    I’m not shitting on this program at all. These are two problems that I’m sure they could solve or just tell straight up “we can’t guarantee it’ll work in XYZ scenarios. Don’t use it if that’s your use case”. Then I saw that this is backed by some kinda SaaS with a domain that ends with .ai, and that explains why THAT FUCKING README IS WRITTEN like a FUCJik/INg MIND NUMBING LINKEDIN POST that my CEO could write bro what the fuck do you mean by simplifying the value of my digital assets in a seamless secure cost efficient way??? Who fucking cares??? ?WHat does your program ACTUALLY DO???

    10000000s of seemingly AI-generated paragraphs going on and on about how convenient their product is, 1 measly line in a diagram that describes what it actually does. Again not to shit on the programmers at all, this is a great idea and I’m glad that it’s being explored I just hate this industry I can’t read another pile of gibberish like that. That ruined my night. Thanks for listening