maor

joined 1 year ago
[–] maor@lemmy.org.il 1 points 1 year ago

Oh thanks for the heads up, I should've read it more carefully :P

 

I recently stumbled upon a problem: I wanted the stdout of a command task to be printed after execution, so I toggled the global -v flag. However, the service module is apparently verbose as shit and printed like a 100 lines and uhh.... that's a costly tradeoff O_o

Seems like a PR for a task-level verbosity keyword has been proposed, yet rejected.

I'm aware it's possible to just register the stdout of the command and print it in a following debug task, but I wonder if there's a prettier solution.

How would you go about this? Ever encountered such a feeling?

[–] maor@lemmy.org.il 1 points 1 year ago* (last edited 1 year ago)

Based in Israel, don't get anything. This is standard as our contacts usually specify that a third of our salary is legally considered compensation for overtime.

There's no defined schedule, it's mostly "whoever is available will take care of the incident, and if multiple people are available then they should join too". It will obviously not go smoothly if you're never available. This is terrible, I wonder if there are any other places that behave like this.

It should be noted that this isn't weird considered the working hours are quite bad compared to the OECD, not terrible though.

 

Saw the post here regarding CentOS's off-springs and a couple of people brought up the excellent point of: why play with fire? Let's just stick to Debian.

The only disadvantage I currently see is the outdated packages, and I'm curious whether makedeb solves them. Does anyone here use it regularly? How stable and comfortable is it? Did you write your own PKGBUILDs?

[–] maor@lemmy.org.il 1 points 1 year ago

Yep, it's more of a reference. I like the argparse tutorial and would love to see more docs of this kind though

[–] maor@lemmy.org.il 14 points 1 year ago* (last edited 1 year ago) (3 children)

I feel the same and I've been using Python for years professionally. It's the lack of examples for me; usually functions and classes aren't meant to be used as-is but rather fed as an argument into some other function or class, and this info is seldom portrayed in the func's documentation. E.g. the documentation of BaseHTTPRequestHandler is one that I trip over every single time, I have to resort to reading the source code of SimpleHTTPRequestHandler to remember how handlers are supposed to be defined 🐺

[–] maor@lemmy.org.il 1 points 1 year ago
[–] maor@lemmy.org.il 1 points 1 year ago* (last edited 1 year ago)

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

[–] maor@lemmy.org.il 42 points 1 year ago* (last edited 1 year ago)

I think you took the joke a bit too seriously

Edit: oh wait wtf I didn't notice the post body. I agree with you then lol

[–] maor@lemmy.org.il 2 points 1 year ago

Haha I'm literally on it right now. My instance crashed a couple of hours ago because of it, so I emptied ~/.rustup to get some time, but idk how to go about it from here. LPP didn't do anything. That seems really curious, does literally everyone use S3?

 

One of my fav Python writeups. I love Python and luckily I get to dictate how it's being written in my job, so I'm forcing types down the through of my colleagues. Saved a bunch of debugging time, so I can waste more time on Lemmy while still getting paid. Good shit

[–] maor@lemmy.org.il 4 points 1 year ago (3 children)

Thanks a lot, I was looking for this exact kind of community. Posted there <3

[–] maor@lemmy.org.il 3 points 1 year ago

I should've mentioned it in the post, but I already tried deleting pics modified more than X days ago. The catch is that I don't wanna delete pics uploaded to my server, I just want to delete pocs cached from other instances :(

 
$ cd lemmy-dir
$ du -sh *
456K    lemmy-ui
15G     pictrs
4.3G    postgres

Guys this is no longer funny please I feel literally chased by the "no space left" message. Please help I don't need those pics I did not upload them

[–] maor@lemmy.org.il 2 points 1 year ago

Yep, I manage my servers and local machine with Ansible so I abstracted it with a role. This is indeed not that bad of a con because it's still plaintext so automation is easy, but it's still a minor issue ;)

[–] maor@lemmy.org.il 9 points 1 year ago

I really liked unity 😞

 

Y'all should try it! I loved seeing it popping on other instances' /instances page, and seeing it polling other communities. Also changing the background in my theme was lit.

Lemmy's hosting documentation is a bit rough around the edges, especially the ARM situation (and its contemporary solution), so I had some extra tinkering to do. No shade at all yeah? I appreciate every bit of their work and I jotted down some points that I need to consolidate into a documentation PR soon.

Anyway, I feel like the extra @... on our usernames should be worn as a badge of honor you feel me? ;)

view more: next ›