Development Blog

Problems With Homebrew Apache After macOS 10.13 Update

I get the meaning of this app – I just spent about 2 hours troubleshooting my local server setup after macOS 10.13 High Sierra update. Despite the annoyance, I do like having a local Apache to test, break, & fix – so I wont be replacing my local server with an app – but I do get the point of it, and I like that they’ve solved that need.

Turns out after High Sierra update, my macOS built in Apache Server resurrected itself, appearing instead of my local Homebrew Apache server – and while trying to fix things, I created a bigger mess and got tangled in troubleshooting.

  • My LaunchDaemons where all messed up
    • determining wether it was macOS Apache or Homebrew Apache was a difficult annoyance
  • Homebrew moved/changed apache2 into httpd and put it in core as a new 2.4.x version of Apache
    • Making my once working httpd.conf in the familiar /usr/local/etc/apache2/2.4/ useless.
    • They now house it in /usr/local/etc/httpd/
  • The new httpd.conf was (of course) default and empty, causing
    • php not to work
    • port 80 was server not found, while 8080 was working
    • sphp wasn’t setup or working
      • Export PATH in .bash_profile was wrong due to improper troubleshooting

Finding individual solutions to these problems was what wasted my time. All fixes for all problems came from a single tutorial, these fine people who baby step through getting Homebrew Apache+PHP+SPHP operational. Bookmarked indefinitely.

SVN Not Working After High Sierra 10.13 Upgrade

Panic Coda 2’s Source Control was blank, and Terminal > svn status returned

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Via StackExchange

Open Terminal, and run the following:
xcode-select --install

Fixed terminal and made the SVC panel of Coda 2 work again after quitting and relaunching the app.

Microsoft Edge Not Showing CSS Base64 SVG Images

I use encoded SVG images for my icons in web pages. I’ll probably continue to do it until http/2 is mainstream. I thought it was pretty standard, but of course, Microsoft Edge has a problem with them.

I get my icons from, which has a beautiful feature allowing to choose color+size then gives you the CSS for the icon.

Microsoft Edge doesn’t show them. Go figure. Trying to find out why, it turns out Edge doesn’t like utf8;


Simply removing that gets the SVG icons working.

Thank you once again Microsoft for making the internet harder.

Create New WordPress Post on Image Upload, Setting as Featured Image

I used to manually do everything for the Images section of my site. Adding an image would involve: save photo after editing, renaming it, uploading, creating new post, setting the title and date, assigning the featured image as the upload, then setting the category to Images so it’s added to the page. So, 8 steps, usually done over-and-over again to a dozen or so images in a batch. We’re talking over 96 steps to get a batch of images online – it took a bit of time, and was slightly demotivating, becoming a chore instead of a hobby.

Able to scratch my own itch – I came up with a way to automate everything. Instead of 96 steps, I now publish an entire batch of images in just 2 simple steps. Yes Two. Too. To. You read correctly, just 2! How’d I do it?

After editing the photos in Lightroom, I use Lightroom’s file-rename feature during bulk export that automatically sets the filename to the images meta timestamp, so YYYYMMDD.jpg.

I then use the following script tapping into the add_attachment hook during bulk upload that does the other 7 steps for each image. Everything in just 1 step, for the entire bulk.

So, all I have to do after exporting from Lightroom, is drag-and-drop upload to the site.

WordPress Dynamically Write Number of Years Since With Shortcode

As the lengthy title says, the follow simple script allows you to use a shortcode to dynamically output the number of years since a specified date. I wrote this for my own bio, which I used to have to update the number of years since the start of my employment once a year. The simple’r solution would be to write, “blah blah blah since 2010” instead of “blah blah blah for 7 years“. But hey, why not.

Simple usage is []years since="2010-07-01"[] would output something like 7.