• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "dotfiles". Back to normal view
    1. Minimal image self-hosting

      In the Tildes Minecraft weekly thread a little while back, there was some discussion about self-hosting images. I've finally done the thing, and figured I'd share the results. The primary goal is...

      In the Tildes Minecraft weekly thread a little while back, there was some discussion about self-hosting images. I've finally done the thing, and figured I'd share the results.

      The primary goal is to make something as simple as possible: I don't really care about galleries or albums, or different file formats, or fancy automatic deduplication etc. I just want to grab an image and throw it up on a link that I can share.

      I do care about easily importing images from various sources, and stripping image metadata.

      The simplest solution I came up with that addresses all these while requiring minimal changes to my existing self-hosted setup is this:

      • Serve a directory of static files from /var/www/i.allemangd.dev on a subdomain with a new server {} block in my existing nginx config.
      • Upload images to that directory via scp. Then access is controlled by SSH and VPN and I don't need to worry about authentication.
      • Convert everything to webp and strip metadata with imagemagick.
      • Don't worry about albums or galleries with the automated tool. I can manually edit the folder structure or rename via ssh/sshfs, but the automated tool just dumps images to a flat directory of $(uuidgen).webp.
      • Pull from the clipboard via xclip by default (I only need to support one platform), or via stdin, path, or url on the command line.
      • Everything in a short autoloded zsh function, and configure destination host/dir/url by environment variables in zshrc.

      The code is at https://git.allemangd.dev/me/imup. @creesch, @Durinthal, @hamstergeddon, @trim: you all participated in my call for recommendations, so have a ping here in case you're interested in the solution I've landed on.

      So, with all that, I'll move some of my minecraft screenshots off of imgur via this tool:

      $ imup \
        'https://i.imgur.com/ecokmB1.png' 'https://i.imgur.com/UNs1mlr.jpeg' 'https://i.imgur.com/83ChnpP.png' \
        2026-01-20_22.15.08.png  2026-01-21_23.06.18.png \
        --tag mc
      
      Output

      Note the ones from the screenshots folder are skipped, since I already ran imup * --tag mc in that directory. Also note that one of the imgur screenshots is skipped, because it came from one of those files.

      I expect the two workflows from here on will be one of:

      • Navigate to my minecraft screenshots directory and execute imup $(date -I)_*.png to share recent updates on the weekly thread. Now just run imup *.png.
      • Prt Sc; "Copy to Clipboard"; imup; Paste the url.

      Some adjustments I might make in the future are:

      • Instead of naming the file by a uuid, name the file by a hash. This way reuploading files won't explode the size of that directory - my "weekly update" thing could just be imup *.png in the screenshots directory. This is done.

      • Synchronize via rsync instead of scp. It should be faster. Instead I now synchronize via temporary sshfs. I think rsync in principle could be faster but this is easier.

      • Set up an sshfs mount with this connection so my minecraft screenshots folder links directly to the static files, like https://i.allemangd.dev/mc/<date>.png. Then no manual commands are necessary. I'm a little hesitant to do that, though, since I'm not sure what happens if I put sshfs to offline host in my fstab, and probably not all my screenshots need to be public. I think I will not do this for fear of accidentally leaking something via an automatically-uploaded file in that directory. Better to be explicit.


      UPDATE: I've rewritten the thing in Python. I now name the files by hash and have a simple linking scheme for "tags". Installation is as easy as uv tool install git+https://git.allemangd.dev/me/imup, and I can carry my config around in dotfiles.

      39 votes
    2. How do I sync my dotfiles between PC and laptop?

      I've been struggling with this for a long time. I want to keep my workflow consistent independent of my "workstation", and have identical dotfiles (like .bashrc, .vimrc etc.) on different devices....

      I've been struggling with this for a long time. I want to keep my workflow consistent independent of my "workstation", and have identical dotfiles (like .bashrc, .vimrc etc.) on different devices.

      So... How you personally deal with this issue, and what should I do?

      Thanks!

      12 votes
    3. How do you manage your dotfiles?

      This area is so much more complex than I first expected, with options like your basic manual cp or symlinks, stow, yadm, homeshick, or hacking together some bash yourself. What do you use?

      23 votes