My Mac Web Dev Setup

The main reason for the following post is for my personal benefit, so I can reference it and remember exactly how I setup everything when I need to do it again. Hopefully someone else can get something useful from this article, but really, that’s just a bonus. With that said, enjoy.

Before doing all the terminal stuff, you probably want to start with downloading iTerm. This is one of the best Terminal alternatives for Mac.


First (real) step, install Homebrew

Homebrew is an essential part of Mac development. It bills itself as “The missing package manager for macOS”. With it we can quickly and easily install any number of packaged applications, utilities, and services.

Open up the terminal and paste the following snippet to download and install Homebrew.


/usr/bin/ruby -e "$(curl -fsSL"

Since we’re going to use the built-in macOS web server, we’ll just setup MySQL

After installing Homebrew, installing other things, like MySQL, is super easy. Just type the following command into your terminal.

brew install mysql

Here’s a little fix if later you can’t access your MySQL databases over Socket

// Reference:
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Using DNSMasq for wildcard URLs and Redirects

// setup dnsmasq for smart urls and redirecting
brew install dnsmasq

Edit the DNSMasq parameters to fit your local network setup/IP

echo 'address=/. localhost/' > $(brew --prefix)/etc/dnsmasq.conf
echo 'listen-address=' > $(brew --prefix)/etc/dnsmasq.conf

This will add the following to your dnsmasq.conf configuration file (/usr/local/etc/dnsmasq.conf)


Setup the DNSMasq resolver directory for your IP address

// create dnsmasq resolver directory and file where is your computer's static IP address
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver" > /etc/resolver/localhost'

Restart DNSMasq

sudo launchctl stop homebrew.mxcl.dnsmasq
sudo launchctl start homebrew.mxcl.dnsmasq

Now, on to the Apache setup

Sorry, no easy terminal commands for this part. Just search through your apache configuration file for these bits and either replace, remove, or comment out.

While I use Sublime Text for pretty much everything else, I use Atom for this. Atom is a wonderful text/code editor and it’s great for editing system files without a problem.


// set the server name
ServerName localhost

// edit the apache config file /private/etc/apache2/httpd.conf
<IfModule unixd_module>
User jonathan // add your username here
Group _www

// uncomment these modules
LoadModule deflate_module libexec/apache2/
LoadModule expires_module libexec/apache2/
LoadModule rewrite_module libexec/apache2/
LoadModule vhost_alias_module libexec/apache2/

// Before High Sierra, uncomment this
LoadModule php5_module libexec/apache2/
// Using High Sierra or beyond, look for something like this:
LoadModule php7_module libexec/apache2/

// comment out this
# <Directory />
# AllowOverride none
# Require all denied
# </Directory>

// change these directories to your web server root (the place you're hosting your sites locally)
DocumentRoot "/Users/jonathan/Documents/www"
<Directory "/Users/jonathan/Documents/www">

// uncomment the "httpd-vhosts.conf" file for the virtual hosts to work with dnsmasq
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

Finally, the Apache Virtual Hosts configuration

Edit the apache vhosts configuration file (/private/etc/apache2/extra/httpd-vhosts.conf)

This uses a free little micro service called for redirecting stuff on your local network using nice, easy to read URLs.

<Directory "/Users/jonathan/Documents/www">
 Options Indexes MultiViews FollowSymLinks
 AllowOverride All
 Order allow,deny
 Allow from all

<Virtualhost *:80>
 VirtualDocumentRoot "/Users/jonathan/Documents/www"
 ServerName home.localhost
 UseCanonicalName Off

<Virtualhost *:80>
 VirtualDocumentRoot "/Users/jonathan/Documents/www/%1"
 ServerName sites.localhost
 ServerAlias *.localhost
 UseCanonicalName Off

// Forget this
<Virtualhost *:80>
 VirtualDocumentRoot "/Users/jonathan/Documents/www/%-7+"
 ServerName nip
 ServerAlias *
 UseCanonicalName Off

Now, restart the Apache server and MySQL for good measure

sudo apachectl -k restart
mysql.server restart

Network DNS settings

In the System Preferences > Network section you’ll need to add an additional DNS server to your network connection (ethernet or wifi). Click on the “Advanced…” button for your active connection and then the DNS tab at the top of this dialog. Here you’ll need to use the + (plus) button to add, first your development machine’s IP address (in my case it would be the same one I’ve been using in the examples:, then the base IP address for your network (generally: After that I usually add in at least one of Google’s DNS addresses ( or [Read more about that here].

The best, free, SQL database manager for Mac: Sequel Pro


Once, downloaded, unzip and move the Sequel Pro app to your Applications folder. Now, open it and setup a Socket connection. All you need is to enter “root” in the user field for now. If everything was setup correct you can now connect directly to your local MySQL server and start setting up your databases.

The first thing I like to do is setup a user for all my local databases.

Command+U brings up the User Accounts dialog. Press the + (plus) button at the bottom left of the User Accounts dialog and enter your username and password. Then go to the “Global Privileges” tab and press the “Check All” button and finally, the “Apply” button to save your new user account.

That’s it for database setup. Now you can add all the local databases you want.


I Made Some Free Commercial Background Music Tracks

Completely free for commercial/personal use. Here’s playlist on soundcloud with a couple songs I’ve made. Totally free, with attribution. Thanks and enjoy!

More information at my Protopolyphonic music blog here.

You can find out complete details on the license for these tracks here: Creative Commons

Link back to the original post or credit me where you use it: Music by Jonathan Brimer via (

Gigs and Gigs of Free New Music Every Year

South by Southwest® (SXSW®) is a yearly collection of conferences and festivals focusing on interactive, film, and music industries. You may have heard of it, maybe even attended. But, did you know every year they release hundreds of promotional music from all kinds of artists attending the festival?

Some really great bands have gotten a lot of publicity and exposure from SXSW. I’ve personally discovered a lot of great indie artists that I would’ve never heard of if not for the SXSW promo music. That said, you can find, currently, almost 70gb of music posted over the last 12 years, legally, at The (Unofficial) SXSW Torrents‘ website.

The only real downside is a lack of metadata and missing album art. Each song has just the name of the artist and song title. If you like discovering new music and don’t mind sorting through hundreds, or thousands, of songs, this is a great resource.

 The (Unofficial) SXSW Torrents

Kiss the Frog Party Game Illustration & Print

My sister was planning a “princess” party for a bunch of little girls. She had the idea of making a pin-the-kiss-on-the-frog game. So, she asked if I could draw a frog prince for her party. I did a quick search online to see what might already be out there and really wasn’t too impressed with what I found. Of course, there’s no shortage of party games and ideas on Pinterest, but I didn’t see anything that I thought was worth recreating for her party. So I decided to make my own, from scratch.

Sometimes I do a number of thumbnail sketches before I get the result I want, this wasn’t one of those times. I showed my first sketch to my sister and she said she loved it. That was it, it didn’t have to be perfect, so I went ahead and took it into Illustrator for the final graphic illustration.

IMG_3143Once I was done with the final vector illustration, my dad helped me with printing. We added a layer of clear laminate to both protect the print and keep the sticky lips from damaging, or sticking permanently, to the image. That said, we printed ten lips along with the frog prince. Each pair of lips has a number on it, from one to ten, along with some double faced tape on the back.

Overall, I’m pretty happy with how it turned out. But, more importantly, all the little princess’s loved it and had a great time at the party.

Illustration is one thing I do, find out more here:

Download and Print PDF licensed under Creative Commons

Unclutter, One of My Favorite Clipboard Utilities

Such a great, simple little mac desktop app. On the left side you get quick access to your recently copied clipboard items. In the middle you can store a few frequently used files or folders. And finally, on the right there’s a nice little plaintext notepad.

The beauty of this utility is in the space, or lack of, that it takes up and how quickly and easily it is to access. As long as it’s running, just move the mouse up to the menubar and scroll down. Boom! There it is. Everything visible and ready to use.

A decent amount of customization and dropbox support makes it one of my favorite and most used utilities on my computer. The one thing I wish I could do is further customize the colors and fonts, especially in the notepad section, rather than just choose from two themes.

Check out the website for more info: or find it on the Mac App Store

Interview with TechToolBelt founder Jeremy Brimer

What is TechToolBelt?

Jeremy: TechToolBelt is a technology company focused on the construction & contracting industry. Much of this industry’s software and technology is very dated or complicated to figure out. We are creating updated and easier to use tools that will make their jobs easier.

What is your mission?

Jeremy: Starting off as a small contractor myself, I always saw the advantage of using different software and technology to increase efficiency and production. However, those things weren’t always available to a small contractor like me because of the expensive costs associated with software and technology. Our mission is to make up to date, efficient, and easy to use software available for everyone, small and large contractors alike.

Why target the construction industry? What’s your background?

Jeremy: Ever since I was a kid, I was enthralled with building things. First it was blocks, then Lego’s, then tree houses, and finally houses. I started working in construction as a teenager and even worked on a lot of volunteer building projects and relief effort both in the U.S.A. and other countries. For many years, I owned and operated my own general contracting business. I have always loved most aspects of construction and I want to make a real difference for this industry. I want to use my background and my knowledge to help others expand their business.

All your products are focused on roofing, why?

Jeremy: We decided to focus our first few products on the roofing section of the construction industry because, first, it was a large part of what I did when I was a contractor. I’ve not only been the one on the roof, removing and installing roofing materials, but I’ve also run multiple crews, done the sales, scheduling, and oversight of roofing projects from start to finish. Another reason, the roofing industry is a large market in itself and it presents challenges in sales, estimating, materials ordering, and coordination. Because of these challenges, sometimes it can take hours or days to write up a simple estimate with the risk of submitting a bid that is too low or too high.

How do you compare to your competition?

Jeremy: It’s no secret we have a few different forms of competition out there, whether it’s a third party reporting company or another software company. But, none of them can match us on our ease of use and cost. We have the easiest mobile software to use and third party reporting companies simply can’t compete with our cost.

Did you have investors? Are you looking for investors?

Jeremy: Yes, most companies need seed money to be able to make their dream a reality, and in our case, both myself and a major investing member invested a lot of money in order to create this concept. As far as further investments go, I’m not opposed to the thought of it, when going through some different stages of growth, capital can be key to growth.

Anything you can tell us about your future plans?

Jeremy: We have some radical changes we are going to make in the near future. We constantly are trying to innovate and change our industry and I feel like the changes to our products we are about to make will make a big difference. We also have a new enterprise option we are developing right now to cater our products to our larger customer.

You can learn more about TechToolBelt and their apps at


Kingdom Hall Specific Branch for PTZ Camera Control


It was requested that, in addition to the generic version of the Camera Control app, I also provide the Kingdom Hall specific variant of the app. So, here it is: You can download the source or download the app/installer for MacOS or Windows respectively.

The main difference in the two branches of the app are the presets. In the normal version the presets are all just numbered buttons. The Kingdom Hall specific one uses various icons I created to show the general use cases for a meeting at a Kingdom Hall of Jehovah’s Witnesses.

You can still find the standard version of the app on it’s Github page:

KH Camera Control on Github:

Camera Control on Github:

PTZ Camera Control App

I was recently part of a team responsible for installing PTZ (pan, tilt, zoom) cameras at our local congregation. After looking long and hard for a quality and affordable solution, we ended up with two cameras from PTZOptics. One of the key features we needed in a PTZ camera was the IP stream and control. While the hardware for these cameras is great, the software left a lot to be desired.

The provided software was free and open source. That’s great, but it was a very old html and javascript app, all written with tables and inline css and javascript. In addition it was very buggy, some things as simple as typos meant entire features of the camera were rendered broken. So, I got started looking through the code and at first was just going to fix and clean up what they had provided. After spending some time with it I decided it would be worth it to completely start from scratch.

CameraControlThe base functionality of the camera is controlled through a series of urls passed over IP to a CGI script installed in the camera itself. This meant all I had to do was send a url with whatever parameters it called for to the camera’s IP address on the local network. I ended up doing this with jQuery and AJAX requests. The basic UI was built on top of Bootstrap overlaid with custom images and design for all the buttons and pieces of the interface. Rewriting the app also gave me a chance to implement some features the original didn’t have, like a kind of auto-pan function, and saving settings to HTMLs local storage for quick easy setup.

Once everything was in place I realized it could fairly easily be converted into an actual desktop app. Rather than using a web browser to access it, including all the clutter and overhead that comes with, I could have it run in it’s own window and keep the desktop much cleaner. I had never used Electron before but I had heard of it and knew that Github Inc. had built their Atom editor using it. Basically, it packages up web technologies (HTML, Javascript, and CSS) into native OSX, Windows, and Linux apps. After reading through some of the basic docs and going through the starter project I was pretty certain I could use it to build my web app into a desktop app.

A few terminal commands later I had a native Mac OSX version of my web app. This meant I could give it an icon, have it startup with the computer like I needed to, and keep it contained in it’s own small window. Probably my favorite part was designing the icon; I think it turned out pretty good. Once I had a basic app working I continued to tweak it until it felt solid. The last thing I did was to open source the project so anyone else in need of some better software for the PTZOptics cameras would have something more than the buggy old stuff to work with. If you’re interested in the code you can find it over at Github available under the GPL 3.0 license.


Added compiled, ready-to-use, release version of the app for both Mac OSX and Windows. You can get’em at GitHub here.

Open REST API for Trivia Questions

Just finished the first draft of a new open API I’ve been working on for access to trivia questions. If you want to signup for an account (all free and open, remember) you can then make calls to retrieve questions, tags, and categories. You can also post your own questions if you’ve got ’em.

Here’s a sample call to retrieve 20 Jeopardy style questions at an offset (basically pages) of 2:


Here’s the response (all responses are JSON):

[ { "id":"106", "user_key":"1", "style":"standard", "difficulty":"0", "category":"Firefly", "question":"From what facility did the ship's doctor Simon rescue his sister River from?", "answer":"Mental", "tags":"sci-fi,pop-culture,western,firefly,serenity,tv,movies", "meta":"", "image":null, "reference":null, "datecreated":"2015-07-21 23:31:43", "datemodified":"2015-07-27 16:39:07" }, { "id":"107", "user_key":"1", "style":"standard", "difficulty":"0", "category":"Firefly", "question":"Simon and River's father had this occupation.", "answer":"Doctor", "tags":"sci-fi,pop-culture,western,firefly,serenity,tv,movies", "meta":"", "image":null, "reference":null, "datecreated":"2015-07-21 23:31:43", "datemodified":"2015-07-27 16:39:07" } ]

For more details on how to use the API check out the homepage: