• 2 Posts
  • 160 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle

  • I’ve been using Linux for maybe 8 years before getting a Mac and found it to be great to use pretty much immediately. So there’s not really much I can tell you here. Except maybe to install the GNU coreutils from homebrew (and that itself if you don’t have it yet), the ones it comes with suck.

    I don’t think there is a way to download Xcode without an Apple ID. The App Store also needs one though you could get by without that. You could just make the account only for downloading Xcode and only sign in in the browser for it, I suppose.

    Edit: Oh yeah, get Mac Mouse Fix if you plan on using it with a normal mouse. The standard scrolling behavior is abysmal.



  • The disks are the most uggo part. They’re a bunch of old disks of varying sizes with a RAID+LVM setup to make the most use of them while still being redundant.

    lsblk output of the whole thing
    saiko@vineta ~ % lsblk
    NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
    sda                       8:0    0 111.8G  0 disk  
    ├─sda1                    8:1    0   512M  0 part  /Volumes/Boot
    └─sda2                    8:2    0 111.3G  0 part  /nix/store
                                                       /
    sdb                       8:16   1 372.6G  0 disk  
    └─sdb1                    8:17   1 372.6G  0 part  
      └─md1                   9:1    0   1.5T  0 raid5 
        └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    sdc                       8:32   1 465.8G  0 disk  
    ├─sdc1                    8:33   1 372.6G  0 part  
     └─md1                   9:1    0   1.5T  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    └─sdc2                    8:34   1  93.1G  0 part  
      └─md2                   9:2    0 279.3G  0 raid5 
        └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    sdd                       8:48   1   4.5T  0 disk  
    ├─sdd1                    8:49   1 372.6G  0 part  
     └─md1                   9:1    0   1.5T  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    ├─sdd2                    8:50   1  93.1G  0 part  
     └─md2                   9:2    0 279.3G  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    ├─sdd3                    8:51   1 465.8G  0 part  
     └─md3                   9:3    0 931.3G  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    └─sdd4                    8:52   1   3.6T  0 part  
      └─md4                   9:4    0   3.6T  0 raid1 
        └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    sde                       8:64   1   7.3T  0 disk  
    ├─sde1                    8:65   1 372.6G  0 part  
     └─md1                   9:1    0   1.5T  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    ├─sde2                    8:66   1  93.1G  0 part  
     └─md2                   9:2    0 279.3G  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    ├─sde3                    8:67   1 465.8G  0 part  
     └─md3                   9:3    0 931.3G  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    └─sde4                    8:68   1   3.6T  0 part  
      └─md4                   9:4    0   3.6T  0 raid1 
        └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    sdf                       8:80   1 931.5G  0 disk  
    ├─sdf1                    8:81   1 372.6G  0 part  
     └─md1                   9:1    0   1.5T  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    ├─sdf2                    8:82   1  93.1G  0 part  
     └─md2                   9:2    0 279.3G  0 raid5 
       └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    └─sdf3                    8:83   1 465.8G  0 part  
      └─md3                   9:3    0 931.3G  0 raid5 
        └─storagevg-storage 254:0    0   6.3T  0 lvm   /Volumes/storage
    sr0                      11:0    1  1024M  0 rom   
    








  • Could you perhaps give some examples so that I can better understand/grasp why you feel that’s the case?

    Hmm, one I guess is that it is not “permanent” and deactivates after one command (in Kakoune, you have to explicitly do ‘;’ to collapse the selection to its end (which you can flip with the start using ‘alt+;’) or move around without extending the selection). That’s really the only thing I can think of at the moment and I feel like often it really doesn’t matter tbh, so maybe I was just talking out of my ass there a bit lmao.

    Apparently you can quickly reselect it in vim with ‘gv’ though, which I never checked until now. That’s useful to know.

    One thing I’m really missing from vim though is that it can list directories, has a hex editor, and can read a bunch of other file formats. I think it can even edit remote files over sftp, but maybe I’m confusing that with Emacs. Kakoune just does local text files (though you can of course do stuff like ‘%|xxd’ to pipe the file through xxd to get a hex view, edit and then ‘%|xxd -r’ and save but that feels very very sketchy).


  • I kinda do for how ubiquitous Vim keybindings are.

    Yeah, that’s a great reason to stick with it. It’s unfortunate that nothing really has Kakoune bindings other than Kakoune.

    I think preference is generally subjective.

    Of course, I know preference is subjective. That’s why I didn’t say “it’s better” :P Could very well be that vim works better for you.

    The big reason I like them more is the concept of selections. Basically instead of a cursor you have a set of selections with start and end position (which could be the same position for a normal cursor), instead of having the object to delete as a parameter. For example, to delete two words it’s ‘d2w’ in vim, while it’s ’2wd’ in Kakoune. And after you type the ‘2w’, the selection shows what you’re about to delete, because it’s a separate command. It’s more useful when you’re operating on larger blocks of text, of course, or chain multiple commands together to create the selection you want. Sure, you can use visual mode in vim but it feels like an afterthought in a lot of ways.

    I’ve already mentioned it but you can also have multiple selections at the same time, which I don’t think vim really does (I could be wrong though). This makes bulk operations really easy since they work exactly the same as operations on a single selection. For example, if you want to prepend let’s say “foo” to the next 10 lines, in Kakoune it would be ‘9CIfoo’ where C creates a selection one line under the current one, and I works the same as in vim. I believe you’d have to use macros for that in vim, something like ‘qqIfoojq9@q’.

    Those two are I think the main reasons I like Kakoune.

    Doesn’t that disrupt muscle memory?

    I haven’t really had problems with it, at least. Maybe because I’ve used vim for a long time before Kakoune. TBH I also don’t really use vim a lot anymore except on one remote machine that isn’t mine.



  • No. The training output is essentially a set of huge matrices, and using the model involves taking your input and those matrices and chaining a lot of matrix multiplications (how many and how big they are depends on the complexity of the model) to get your result. It is just simply not possible to understand that because none of the data has any sort of fixed responsibility or correspondence with specific features.

    This is probably not exactly how it works, I’m not a ML guy, just someone who watched some of those “training a model to play a computer game” videos years ago, but it should at the very least be a close enough analogy.


  • Since you mention nginx, I assume you’re talking about proxying HTTP and not SMTP/IMAP… For that, you have the X-Forwarded-For header which is exactly for that, retaining the real source IP through a reverse proxy.

    You should be able to add proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; to your location block.

    Alternatively, looks like there’s a Forwarded header (RFC from 2014) which I’ve never seen before but it seems cool: https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/

    I guess it comes down to what mailu supports, I have never used that.

    If you are talking about SMTP and IMAP, I don’t think there’s a standard way to do this. You’d have to set up port forwarding on the VPS for the SMTP ports and IMAP port, and set up your home server to accept connections from any IP over the wireguard interface.

    That’s exceedingly horrible though and there’s a better option for SMTP at least: set up an MTA (e.g. Postfix) on the VPS and have it forward mail to the real destination server. And for outgoing mail it never has to touch your home server (except your client copying it into the Sent inbox over IMAP), just send it out over the VPS directly. Or if you’re using some builtin web client, I guess do set the MTA on your local server to send mail to the VPS’s MTA.






  • 2xsaiko@discuss.tchncs.detoSelfhosted@lemmy.worldShould I move to Docker?
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    2
    ·
    11 months ago

    No. (Of course, if you want to use it, use it.) I used it for everything on my server starting out because that’s what everyone was pushing. Did the whole thing, used images from docker hub, used/modified dockerfiles, wrote my own, used first Portainer and then docker-compose to tie everything together. That was until around 3 years ago when I ditched it and installed everything normally, I think after a series of weird internal network problems. Honestly the only positive thing I can say about it is that it means you don’t have to manually allocate ports for those services that can’t listen on unix sockets which always feels a bit yucky.

    1. A lot of images comes from some random guy you have to trust to keep their images updated with security patches. Guess what, a lot don’t.
    2. Want to change a dockerfile and rebuild it? If it’s old and uses something like “ubuntu:latest” as a base and downloads similar “latest” binaries from somewhere, good luck getting it to build or work because “ubuntu:latest” certainly isn’t the same as it was 3 years ago.
    3. Very Linux- and x86_64-centric. Linux is of course not really a problem (unless on Mac/Windows developer machines, where docker runs a Linux VM in the background, even if the actual software you’re working on is cross-platform. Lmao.) but I’ve had people complain that Oracle Free Tier aarch64 VMs, which are actually pretty great for a free VPS, won’t run a lot of their docker containers because people only publish x86_64 builds (or worse, write dockerfiles that only work on x86_64 because they download binaries).
    4. If you’re using it for the isolation, most if not all of its security/isolation features can be used in systemd services. Run systemd-analyze security UNIT.

    I could probably list more. Unless you really need to do something like dynamically spin up services with something like Kubernetes, which is probably way beyond what you need if you’re hosting a few services, I don’t think it’s something you need.

    If I can recommend something instead if you want to look at something new, it would be NixOS. I originally got into it because of the declarative system configuration, but it does everything people here would usually use Docker for and more (I’ve seen it described it as “docker + ansible on steroids”, but uses a more typical central package repository so you do get security updates for everything you have installed, and your entire system as a whole is reproducible using a set of config files (you can still build Nix packages from the 2013 version of the repository I think, they won’t necessarily run on modern kernels though because of kernel ABI changes since then). However, be warned, you need to learn the Nix language and NixOS configuration, which has quite a learning curve tbh. But on the other hand, setting up a lot of services is as easy as adding one line to the configuration to enable the service.