SinTan1729

joined 8 months ago
[–] SinTan1729@programming.dev 1 points 1 hour ago* (last edited 1 hour ago)

I have no experience in sysadmin work, but have some understanding of the Linux tools used. Can you eli5 what exactly is it that AD does? (Feel free not to, I just couldn't find a good article, so decided to ask.)

Omg please kill me 😭

[–] SinTan1729@programming.dev 2 points 3 days ago (1 children)

Ah that makes sense. To be fair tho, there's a lot of unwarranted hate towards Rust so it can be hard to tell.

[–] SinTan1729@programming.dev 4 points 4 days ago* (last edited 4 days ago) (3 children)

I hope you're joking. If anything, Rust makes error handling easier by returning them as values using the Result monad. As someone else pointed out, they literally used unwrap in their code, which basically means "panic if this ever returns error". You don't do this unless it's impossible to handle the error inside the program, or if panicking is the behavior you want due to e.g. security reasons.

Even as an absolute amateur, whenever I post any Rust to the public, the first thing I do is get rid of unwrap as much as possible, unless I intentionally want the application to crash. Even then, I use expect instead of unwrap to have some logging. This is definitely the work of some underpaid intern.

Also, Python is sloooowwww.

[–] SinTan1729@programming.dev 12 points 1 week ago (5 children)

KDE is great but do give some "better" distros like Fedora, or EndeavourOS (basically Arch) a try. Canonical, the company in control of Ubuntu, is a little bit shady.

[–] SinTan1729@programming.dev 3 points 1 week ago* (last edited 1 week ago)

I have a Framework 13 with the super button instead of Windows button, but I've set it up similarly to how the Windows buttons works in Windows. Pressing it by itself opens the KDE app menu, super+D goes to desktop, super+L locks screen, super+[ or ] moves around virtual desktops, super+W shows overview, supe+T shows tiles config, super+arrows do snapping, super+PgUp/PgDn/X for maximize/minimize/close etc.

[–] SinTan1729@programming.dev 5 points 2 weeks ago* (last edited 2 weeks ago)

Welcome to the club. Don't worry too much about setting it up perfectly in your first attempt. You're gonna rewrite your whole config every year-ish anyway. (Or is that just me? πŸ˜₯) Also, try Neovim. It'll be a drop-in replacement for your current config. But Lua is just a superior language compared to Vimscript, so you'll have a much better performance in the future. You also get all the sweet LSP and treesitter features.

[–] SinTan1729@programming.dev 3 points 2 weeks ago* (last edited 2 weeks ago)

Yeah, same. I like to code in Neovim, and OOP just doesn't make any sense in there. Fortunately, I don't have to code in Java often. I had to install Android Studio just because I needed to make a small bugfix in an app, it was so annoying. The fix itself was easy, but I had to spend around an hour trying to figure out where the relevant code exactly is.

[–] SinTan1729@programming.dev 4 points 2 weeks ago (2 children)

As an amateur with some experience in the functional style of programming, anything that does SOLID seems so unreadable to me. Everything is scattered, and it just doesn’t feel natural. I feel like you need to know how things are named, and what the whole thing looks like before anything makes any sense. I thought SOLID is supposed to make code more local. But at least to my eyes, it makes everything a tangled mess.

Firefox 91.0 (August 2021) set HTTPS as default for private tabs. Firefox 129.0 (August 2024) did it for general tabs.

[–] SinTan1729@programming.dev 2 points 3 weeks ago (1 children)

I agree with the other comments saying that you don't really need secure boot. But if you're like me, you might be tempted to get it to work anyway. In that case, here's a (hopefully) useful link.

 

cross-posted from: https://programming.dev/post/39212874

I recently migrated my services from rootful docker to rootless podman quadlets. It went smoothly, since nothing I use actually needs to be rootful. Well, except for caddy. It needs to be able to attach to privileged ports 80 and 443.

My current way to bypass it is using HAProxy running as root and forwarding connections using proxy protocol. (Tried to use firewalld but that makes the client IP opaque to caddy.) But that adds an extra layer, which means extra latency. It's perfectly usable, but I'd like to get rid of it, if possible.

I'm willing to run caddy in rootful podman if needed. But from what I understand, that means I can't have it in the same rootless network as my other containers. I really don't wanna open most of my containers' ports, so that's not an option.

So, I'm asking whether any of these three things are possible.

  1. Use firewalld to forward ports to caddy without obscuring the client's IP.
  2. Make rootful caddy share a network with other rootless containers.
  3. Assign privileged ports to caddy somehow, in rootless mode. (I know there's a way to make all these ports unprivileged, but is it possible to only assign these 2 ports as unprivileged?)

Or maybe there's a fourth way that I'm missing. I feel like this is a common enough setup, that there must be a way to do it. Any pointers are appreciated, thanks.

 

I recently migrated my services from rootful docker to rootless podman quadlets. It went smoothly, since nothing I use actually needs to be rootful. Well, except for caddy. It needs to be able to attach to privileged ports 80 and 443.

My current way to bypass it is using HAProxy running as root and forwarding connections using proxy protocol. (Tried to use firewalld but that makes the client IP opaque to caddy.) But that adds an extra layer, which means extra latency. It's perfectly usable, but I'd like to get rid of it, if possible.

I'm willing to run caddy in rootful podman if needed. But from what I understand, that means I can't have it in the same rootless network as my other containers. I really don't wanna open most of my containers' ports, so that's not an option.

So, I'm asking whether any of these three things are possible.

  1. Use firewalld to forward ports to caddy without obscuring the client's IP.
  2. Make rootful caddy share a network with other rootless containers.
  3. Assign privileged ports to caddy somehow, in rootless mode. (I know there's a way to make all these ports unprivileged, but is it possible to only assign these 2 ports as unprivileged?)

Or maybe there's a fourth way that I'm missing. I feel like this is a common enough setup, that there must be a way to do it. Any pointers are appreciated, thanks.

 

This release adds the ability to edit existing links, show and download QR codes for easy sharing, and various improvements in the frontend. Check out the release note for a list of all changes.

 

I simply want to emulate the effect of -p by default i.e. open all files in tabs when multiple files are supplied. I wrote the following autocommand to make it work.

-- Open files in tabs by default
vim.api.nvim_create_autocmd("VimEnter", {
    callback = function()
        if not vim.opt.diff:get() and #vim.fn.argv() > 1 then
            vim.cmd("tab sball")
            vim.cmd("tabfirst")
        end
    end,
})

But it seems to bork the colorscheme for all but the first tab. It's weird since Running the same commands manually after neovim is loaded works perfectly. I may have something to do with the order in which things are run. Is it possible to run this command as late as possible?

I'm open to alternative approaches that gets the job done.

 

I thought of this after a recent trip with some friends. We shared the photos when we were still in person. But sometimes we need to share a lot of photos over the internet. In the past, we have used a shared google drive directory for this. But I'd prefer a self-hosted option. There should be some sort of password protection as well (ideally per share, and no need for accounts). One should be able to both access the current files and upload new ones, just like google drive or dropbox.

I currently have FileShelter, which works for 1-to-1 sharing but not for groups. I guess something like ProjectSend would work, but it's too complex for my usecase. I'd prefer something more lightweight since I'll maybe use it once every few months. Also, it should be noob-friendly, and accessible using a browser.

Update: I'm very happy with copyparty. It does what I want, and much much more. I even replaced my older webdav server with it since it provides more granular control over share locations and permissions. Kudos to the developer @tripflag@lemmy.world!

 

Someone added a PR to an app of mine adding instructions for k8s setup. I do like the idea of providing these instructions, but I don't have any experience with k8s whatsoever. The commits look fine to me, but in case anyone is experienced, I'd appreciate if you can take a look. I don't want to inadvertently add something malicious. Here's a link to the PR: https://github.com/SinTan1729/chhoto-url/pull/48, thanks.

 

A simple selfhosted URL shortener with no unnecessary features. Simplicity and speed are the main foci of this project. The docker image is ~6 MB (compressed), and it uses <5 MB of RAM under regular use.

view more: next β€Ί