All camera lenses have a minimum focusing distance. That is the closest you can be to a subject and still get it in focus. The minimum focusing distances for iPhone cameras aren’t listed on the tech specs page, but it looks like it’s around four feet on the 5x camera on iPhone 15 Pro Max.… Continue reading Optical or Digital: Minimum focusing distance on iPhone 15 Pro Max 5x camera
Category: Technology
Mastodon discoverability on your domain using the nginx location directive
tl;dr: Puts the .well-known/webfinger content in your server config instead of the filesystem. This setup is inspired by Maarten Balliauw‘s Mastodon on your own domain without hosting a server. Please read the linked post for details. The general idea is you can create a special file on your website that allows people to find you… Continue reading Mastodon discoverability on your domain using the nginx location directive
iCloud with Custom Email Domains
Google announced that users of their “G Suite legacy free edition” will soon have to start paying. I’ve begun exploring my options, the first of which was iCloud. (For those who don’t know, Apple recently started supporting custom email domains for users of any paid tier of iCloud.) Features No additional cost if you already… Continue reading iCloud with Custom Email Domains
Ubiquiti UniFi Access Points with VLANs on Juniper EX switches
It is assumed that you already have VLANs configured on your switch and router. This post only describes how to configure the ports that your APs connect to. If you want to use VLANs on Ubiquiti’s UniFi line of access points, the switch ports they connect to must offer a native or untagged VLAN in… Continue reading Ubiquiti UniFi Access Points with VLANs on Juniper EX switches
Comparing Lists in Python
If you have two lists that have the same content in a different order (1, 2, 3, vs 3, 2, 1) are they they the same or different? Python considers them to be different. In some cases order may not matter to you, and you just want to know if the same items exist in… Continue reading Comparing Lists in Python
Shell scripting: Iterate over a list line-by-line instead of word-by-word
Let’s say a directory contains these files: My First File.txtMy Second File.txt If you wanted to take an action on each distinct file, you might try something like this: for file in `ls ~`; do echo $file; done The output will look like below, because the spaces and line breaks are both treated delineators of… Continue reading Shell scripting: Iterate over a list line-by-line instead of word-by-word
Automatically Update WordPress, Themes, and Plugins using WP-CLI
WordPress is a hugely popular blog/CMS platform, but with widespread adoption comes risk: It is a common target for hackers, exploits, etc. Accordingly, you should make sure it gets regular updates. WordPress has a built-in update mechanism but this also requires that its PHP files be writable by the web server, introducing a new set… Continue reading Automatically Update WordPress, Themes, and Plugins using WP-CLI
Creating HFS+ disk images from folders in High Sierra
In macOS 10.13, if you use Disk Utility to create a new image from a folder, it will be APFS formatted. These images can only be read on 10.12 or newer, and there’s no option to pick a different format in the GUI. Instead you can use hdiutil in Terminal make a folder into an HFS+… Continue reading Creating HFS+ disk images from folders in High Sierra
Desktop Picture Profile Creator
DesktopPictureProfileCreator is a simple bash script that generates mobileconfig profiles for managing the desktop picture on macOS computers. Run the script followed by the path to the image you want to set as the desktop picture. For example “sh DesktopPictureProfileCreator.sh /Library/Desktop\ Pictures/Aqua\ Blue.jpg”. Whatever path you specify must exist in the same location on the computer(s) you intend… Continue reading Desktop Picture Profile Creator
File ownership considerations with Nginx and php-fpm
I recently switched my CentOS 7 web server over to Nginx and php-fpm. From my experience with Apache I assumed that PHP scripts would be executed by the same user the web server is running as — ‘nginx’ in this case. But this could no longer be taken for granted since php-fpm is a separate… Continue reading File ownership considerations with Nginx and php-fpm