...

hurflmurfl

250

Karma

2019-01-27

Created

Recent Activity

  • Ah yes.

    The shortcut I use the most in Jetbrains IDEs. Also the one I miss the most in VSCode (whatever is present there just doesn't seem to work right).

    Also the shortcut that has caused me to close so many browser tabs inadvertently...

  • Since everything is essentially opening WebApps via QR codes on your WeChat/AliPay app, it's actually great for tourists. The apps have a built-in option to do machine translation of the screen to English, which I used when I took a trip to China. In the case where it doesn't translate some part of the UI, I could still use screenshot translation on my phone, so overall it's very easy to get around speaking/reading zero Chinese.

  • Fair question. Conflicts happen, which I'm fine with.

    Realistically speaking, most files I have in my cloud are read-only. The most common file that I read-write on multiple devices is my keepass file, which supports conflict resolution (by merging changes) in clients.

    Also used to happen when I tried editing some markdown notes using obsidian on PC, and then using text editor (or maybe obsidian again?) on android, but I eventually sort of gave up on that use-case. Editing my notes from my phone is sort of inconvenient anyway, so I mostly just create new short notes that I can later edit into some larger note, but honestly can't remember the last time this happened.

    But yes, if not careful, you could run into your laptop overwriting the file when it comes online. In my case, it doesn't really happen, and when it does, Nextcloud will have the "overwritten version" saved, so I can always check what was overwritten and manually merge the changes.

    P.S. If anyone wants to set this up, here's my nixos config for the service, feel free to comment on it:

      # don't forget to run `rclone config` beforehand
      # to create the "nextcloud:" remote
      # some day I may do this declaratively, but not today
      systemd.services.rclone-nextcloud-mount = {
        # Ensure the service starts after the network is up
        wantedBy = [ "multi-user.target" ];
        after = [ "network-online.target" ];
        requires = [ "network-online.target" ];
    
        # Service configuration
        serviceConfig = let
          ncDir = "/home/username/nextcloud";
          mountOptions = "--vfs-cache-mode full --dir-cache-time 1w --vfs-cache-max-age 1w";
        in {
          Type = "simple";
          ExecStartPre = "/run/current-system/sw/bin/mkdir -p ${ncDir}"; # Creates folder if didn't exist
          ExecStart = "${pkgs.rclone}/bin/rclone mount ${mountOptions} nextcloud: ${ncDir}"; # Mounts
          ExecStop = "/run/current-system/sw/bin/fusermount -u ${ncDir}"; # Dismounts
          Restart = "on-failure";
          RestartSec = "10s";
          User = "username";
          Group = "users";
          Environment = [ "PATH=/run/wrappers/bin/:$PATH" ];
        };
      };

  • I'm using the nextcloud app on my android, and for my Linux systems I mount WebDAV using rclone, with VFS cache mode set to FULL. This way I can: 1. Have the file structure etc synced to local without downloading the files 2. Have it fetch files automatically when I try to read them. Also supports range requests, so if I want to play a video, it sort of streams it, no need to wait for download. 3. If a file has been accessed locally, it's going to be cached for a while, so even if I'm offline, I can still access the cached version without having to verify that it's the latest. If I'm online, then it will verify if it's the latest version.

    Overall, this has worked great for me, but it did take me a while before I set it up correctly. Now I have a cache of files I use, and the rest of the stuff that I just keep there for backup or hogging purposes doesn't take disk space and stays in the cloud until I sync it.

  • Right, but then you need to learn the right motions well, motions that will make sense at the final speed. I suppose it's one of those things that are made easier by having a teacher.

HackerNews