Computer posts

Rsync and dealing with “some files vanished” warning

I use rsync for backups, site deployments, and other purposes where I need to sync two folders. It took a little while to figure out, but has been great for those purposes since. Every once in a while, though, I run into issues with it. Recently, I set up an rsync script to back up most of the files on my entire computer. Since this takes a while and the computer is actively running during the backup, things can change while it is still running. This can lead to some errors like “rsync warning: some files vanished before they could be transferred”. Even though this is a warning, and the sync works perfectly fine, it returns a non-zero exit code. This caused my script to stop and thus the rest of the backup activity didn’t finish.

I looked for an option or simple solution to allow it to go on without complaining.

Continue reading post "Rsync and dealing with “some files vanished” warning"

Swap file for composer out of memory problems

PHP’s defacto package manager, composer, has long required large amounts of memory to do updates for larger projects, often more than servers or virtual machines have. The script will die with an out of memory error, or more recently, the simple message “Killed”, and do no work in these situations. The normal procedure is to develop locally, deploy local lock file (composer.lock) to the server, and run composer install instead of update. But I’ve recently moved to doing most of my development in VMs, so I have had to work around this problem to get things installed or updated. A swap file is the solution for Linux machines provided in the official docs and expanded in a StackOverflow answer.

Continue reading post "Swap file for composer out of memory problems"

Unprivileged Homebrew install, 2021 edition

On my new MacBook, I’ve been isolating responsibilities into separate user accounts. This includes an unprivileged “manager” account for installing most global third-party software, and a few development accounts for different purposes. I use Homebrew to install some dev related software, but my old Homebrew setup didn’t work with this conceptually, nor with the more locked down privileges of newer Mac OS versions. I didn’t want to give Homebrew or its packages admin or root privileges, so I have adapted Homebrew’s untar anywhere method to install a globally available Homebrew using the unprivileged manager account, only requiring a privileged account briefly. I’ve also used untar anywhere for a per-account Homebrew install to allow each dev account to have custom versions of any desired packages, with no privileged account required.

Continue reading post "Unprivileged Homebrew install, 2021 edition"

Firefox: Weird rendering with high contrast mode

I figured out why Firefox 91+ seemed to break some CSS rendering for me (as I blogged about a few weeks back): high contrast mode. I’ve used the accessibility setting “Increase Contrast” on Mac OS for some time to make it easier to see some interface elements. Apparently, via Firefox 91 release notes, “Firefox now automatically enables High Contrast Mode when ‘Increase Contrast’ is checked on MacOS”.

Continue reading post "Firefox: Weird rendering with high contrast mode"

Purchase: New laptop, MacBook Air

I’ve made another new laptop purchase in the past couple months: I bought a refurbished 2020 MacBook Air from Apple.com. It has a 10th gen i3 Intel processor, 8GB of RAM, and 256GB of storage. I bought it to replace my struggling 11 year old MacBook. I bought a Lenovo Yoga 7i, but was struggling to get comfortable with it for my web development work. I made the call to get the Mac so I could directly migrate both my work computer user and my personal computer users, with the plan to use it for development and use the Yoga for other stuff.

Continue reading post "Purchase: New laptop, MacBook Air"

Purchase: New laptop, Lenovo Yoga 7i

Last month, I finally bought a new laptop with plans to replace my aging 2009 Macbook as my primary computer. It is a Lenovo Yoga 7i, purchased from MicroCenter. It is a switch from Mac, which has been my primary OS for pretty much since I’ve been using computers, but it has touch screen and I hope to switch to the open world of Linux.

Continue reading post "Purchase: New laptop, Lenovo Yoga 7i"