Software Engineering in WordPress, PHP, and Backend Development

Category: Notes (Page 5 of 49)

Notes on programming-related problems that I’ve encountered while working on various projects.

Writing PHP Command-Line Applications: A Basic Script

TL;DR: I’ve been writing PHP command-line scripts to help automate mundane tasks. As these tasks are growing in complexity or turning more into applications that interface with third-party APIs, I’m documenting the things I find important that others may also find helpful.


There are three things necessary to get a basic script up and running on your local machine (assuming you already have PHP installed):

  1. Know the path to the PHP binary,
  2. Make sure your script references said binary,
  3. And make the script executable.
Continue reading

What To Do When Xcode CLI Tools Won’t Install

TL;DR: If the standard terminal commands don’t work for uninstalling and reinstalling the Xcode CLI tools, use this page and search for the latest version of the tools to download. You don’t need a developer account to access it.

If you work both in a terminal and on a Mac, then you’re likely familiar with the Xcode Command Line Tools (and the necessary utilities they provide for things like Git, building front-end assets, etc.).

If you’re not familiar, here’s the gist:

[Command Line Tools] enables UNIX-style development via Terminal by installing command line developer tools, as well ass macOS SDK frameworks and headers. Many useful tools are included such as the Apple eLLVM compiler, linker, and Make.

Apple Developer Downloads

Obviously, I’m not an iOS or a macOS developer, but there’s plenty of work that I do in the terminal and I need some of these tools for.

Continue reading

Quick Tip: Fix Library Not Loaded for Node

If you’ve installed Node via Homebrew and, at any point, are trying to execute a shell script to start up a containerized environment (or maybe something else – I’m speaking solely from my experience) and you’re presented with this message or something like it:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
  Referenced from: /usr/local/bin/node
  Reason: image not found
Continue reading
« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑