<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MacOS on /var/log/janio</title><link>https://devops.sarmento.org/en/categories/macos/</link><description>Recent content in MacOS on /var/log/janio</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 26 May 2026 07:00:00 +0000</lastBuildDate><atom:link href="https://devops.sarmento.org/en/categories/macos/index.xml" rel="self" type="application/rss+xml"/><item><title>SOPS + age: Declarative, Secure Secrets Management Without GPG Headache</title><link>https://devops.sarmento.org/en/posts/sops-and-age-secrets-management-in-practice/</link><pubDate>Tue, 26 May 2026 07:00:00 +0000</pubDate><guid>https://devops.sarmento.org/en/posts/sops-and-age-secrets-management-in-practice/</guid><description>&lt;p&gt;As I previously discussed in my post on &lt;a href="https://devops.sarmento.org/posts/secret-management-macos-linux/"&gt;secret management in macOS and Linux&lt;/a&gt;, the real challenge of managing keys and tokens isn&amp;rsquo;t the encryption itself, but reducing accidental leakage without turning the sysadmin&amp;rsquo;s daily routine into a bureaucratic nightmare. Over the last few years, however, a duo of tools has gained significant traction and completely changed this dynamic: &lt;strong&gt;Mozilla SOPS&lt;/strong&gt; and &lt;strong&gt;age&lt;/strong&gt;. Together, they enable a declarative, GitOps-friendly, and extremely secure approach with virtually zero friction. This post is a detailed look at how these tools work and how to integrate them practically into your daily workflow.&lt;/p&gt;</description></item><item><title>Secret Management on macOS and Linux: a Practical-Theoretical Approach</title><link>https://devops.sarmento.org/en/posts/secret-management-macos-linux/</link><pubDate>Sun, 17 May 2026 11:54:00 +0000</pubDate><guid>https://devops.sarmento.org/en/posts/secret-management-macos-linux/</guid><description>&lt;p&gt;At some point in the life of almost every sysadmin, there comes a slightly uncomfortable realization: too many secrets are scattered across the environment.&lt;/p&gt;
&lt;p&gt;A password inside a &lt;code&gt;.env&lt;/code&gt; file here, a token buried in shell history there, a forgotten webhook inside a &lt;code&gt;docker-compose.yml&lt;/code&gt;, an API key hardcoded into a “temporary” script that somehow survived for two years in production. None of those things seem catastrophic individually. The problem is that infrastructure rarely collapses because of one gigantic mistake; most of the time, it collapses under the accumulated weight of dozens of tiny operational shortcuts.&lt;/p&gt;</description></item><item><title>Automatically deleting emails in Apple Mail with AppleScript + launchd</title><link>https://devops.sarmento.org/en/posts/automatically-deleting-emails-in-apple-mail-with-applescript-and-launchd/</link><pubDate>Mon, 30 Mar 2026 20:24:00 +0000</pubDate><guid>https://devops.sarmento.org/en/posts/automatically-deleting-emails-in-apple-mail-with-applescript-and-launchd/</guid><description>&lt;p&gt;My inbox is always full of notifications with subjects like &lt;code&gt;[Ticket ID: 12345] Ticket Update&lt;/code&gt;. They&amp;rsquo;re useful for a few hours and then become noise. These aren&amp;rsquo;t emails that need to be archived, replied to, or revisited, so they just end up taking up mental space.&lt;/p&gt;
&lt;p&gt;Deleting them manually is the kind of small task that never becomes a priority, but silently costs you in distraction. So I decided to treat it like any other recurring problem: automate it locally, without relying on external services, no &lt;em&gt;webhooks&lt;/em&gt;, and no integrations. The idea is to periodically run a script that moves to the trash any &lt;a href="https://devops.sarmento.org/experiencias-com-mensagens-subliminares/"&gt;messages&lt;/a&gt; whose subject matches a specific pattern and that are older than 48 hours.&lt;/p&gt;</description></item><item><title>Automatically Converting Images to WEBP and AVIF</title><link>https://devops.sarmento.org/en/posts/automatically-converting-images-to-webp-and-avif/</link><pubDate>Thu, 26 Mar 2026 22:19:00 +0000</pubDate><guid>https://devops.sarmento.org/en/posts/automatically-converting-images-to-webp-and-avif/</guid><description>&lt;p&gt;The two previous posts built the monitoring infrastructure — &lt;a href="https://devops.sarmento.org/en/posts/monitoring-files-and-folders-with-launchd-watchpaths-in-practice/"&gt;&lt;code&gt;WatchPaths&lt;/code&gt; on macOS&lt;/a&gt;, &lt;a href="https://devops.sarmento.org/en/posts/monitoring-files-and-folders-on-linux-with-systemd-path-units-and-inotifywait/"&gt;systemd path units and &lt;code&gt;inotifywait&lt;/code&gt; on Linux&lt;/a&gt; — and promised the scripts would come later. The trigger is ready: launchd or systemd detects when something changes in a directory and fires a command. What is missing is the command itself.&lt;/p&gt;
&lt;p&gt;This post delivers the image conversion script that those triggers will fire. The goal is simple: PNGs and JPGs go into a folder, WEBP or AVIF come out. The originals are deleted or moved, depending on the configuration. The script detects which encoders are available on the machine and picks the best one among those installed, with a fallback chain that ensures it works even when the ideal tool is not present. If no compatible encoder is found, the script tells you what to install and from which package manager.&lt;/p&gt;</description></item><item><title>Monitoring Files and Folders with launchd: WatchPaths in Practice</title><link>https://devops.sarmento.org/en/posts/monitoring-files-and-folders-with-launchd-watchpaths-in-practice/</link><pubDate>Thu, 26 Mar 2026 18:56:00 +0000</pubDate><guid>https://devops.sarmento.org/en/posts/monitoring-files-and-folders-with-launchd-watchpaths-in-practice/</guid><description>&lt;p&gt;In the &lt;a href="https://devops.sarmento.org/en/posts/scheduling-tasks-on-macos-with-launchd-no-cron-no-workarounds/"&gt;previous post about launchd&lt;/a&gt;, scheduling worked by time: &lt;code&gt;StartCalendarInterval&lt;/code&gt; defined &amp;ldquo;every day at 7 AM&amp;rdquo; and the system took care of the rest, including recovering missed executions when the Mac was asleep. For periodic tasks like sending a daily briefing or running a maintenance script, that model works perfectly — it is the functional equivalent of cron, but integrated into the macOS lifecycle.&lt;/p&gt;
&lt;p&gt;But not every automation makes sense tied to a clock. Some tasks only need to happen when something changes. A backup that runs every hour is wasting 23 executions per day if the database was only modified once. An image conversion that runs every 5 minutes has nothing to convert most of the time, and when it finally does, up to 5 minutes have passed since the file appeared. The time-based model works, but it is polling disguised as scheduling — and polling is almost always the least elegant solution to any synchronization problem.&lt;/p&gt;</description></item><item><title>Scheduling Tasks on macOS with launchd: No cron, No Workarounds</title><link>https://devops.sarmento.org/en/posts/scheduling-tasks-on-macos-with-launchd-no-cron-no-workarounds/</link><pubDate>Mon, 23 Mar 2026 21:29:00 +0000</pubDate><guid>https://devops.sarmento.org/en/posts/scheduling-tasks-on-macos-with-launchd-no-cron-no-workarounds/</guid><description>&lt;p&gt;In the &lt;a href="https://devops.sarmento.org/en/posts/systemd-timers-time-to-retire-cron/"&gt;previous post&lt;/a&gt; I showed how systemd timers replace cron on Debian and Ubuntu servers with concrete advantages: integrated logging, missed execution recovery, declarative dependencies, and resource control. The logic is compelling and the migration is straightforward — as long as you are on a system running systemd. But if your daily routine includes a Mac, it is a different story.&lt;/p&gt;
&lt;p&gt;macOS has its own scheduling system, predating systemd and built on a different philosophy. It is called &lt;a href="https://devops.sarmento.org/posts/monitoring-files-and-folders-with-launchd-watchpaths-in-practice/"&gt;launchd&lt;/a&gt;, it has been around since Mac OS X Tiger in 2005, and it is responsible for practically everything that runs in the background on the system — from internal Apple services to that Spotify updater you never asked to install. Despite being the official and recommended way to schedule tasks on a Mac, launchd lives in a kind of blind spot: people coming from Linux tend to reach for cron out of reflex, and Mac users without a sysadmin background do not even know the option exists.&lt;/p&gt;</description></item></channel></rss>