Archive for the ‘Apple’ Category

Updating UUID Generation on macOS Monterey

Thursday, November 11th, 2021

Yosemite

With the update to macOS Monterey, the previous macOS command-line program for generating UUIDs, uuid, has been replaced with uuidgen. I'm not at all sure why the change, but I was glad that a little investigation with ls /usr/bin revealed something that turned out to be the winner.

With this, one of my favorite aliases is now:

alias uupb="uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '\n' | pbcopy"

which generates a new UUID, lower-cases all the characters, removes the trailing new-line, and then puts it into the paste buffer for pasting in an editor, or on a form... as many times as you need.

I don't know if there are even release notes about the changes at this level of macOS, but they usually get figured out - one way or another. 🙂

MacBook Pro Delivers Today

Tuesday, November 2nd, 2021

Apple M1 Max

It looks like my new MacBook Pro is Out for Delivery today, and it could be a good day. 🙂 I'm planning on using Migration Assistant to move my User files and Settings, but not anything in /usr - which I have done in the past, but this time, I'm going to leave Homebrew installed on my Intel machine, and I'll just install the ARM-version of Homebrew once I get the laptop all set-up.

When I get it set up, I'll then install the ARM Homebrew, and then:

  $ brew install --cask temurin
  $ brew install leiningen
  $ brew install jq

And from there, I can set up nodenv and rvm... and then just work my way to getting back to running everything I need. Should be an interesting day or two... 🙂

macOS 12 Monterey Dropped PHP

Monday, November 1st, 2021

php.jpg

I knew it was coming... they warned me with macOS 11 Big Sur... but it was still a bit of a surprise this morning to reconfigure Apache 2 to use userdir, which macOS Monterey doesn't enable by default, and undoes if you have it already configured. That's OK, it's not a huge deal to turn it back on, but the big news was the complete loss of PHP.

I haven't used it in many years, but it was the one tool that shipped with macOS that I could talk to Postgres, and script, but hey... things change, and they did warn me. 🙂

I guess it would be nice to have something like Node automatically handled, but then that would likkely clash with the Node devs and the nodenv installs, etc. So I'll live with Apache 2, and the userdir, and then just serve up static content on port 80, and leave the other stuff for the development environments.

Preparing for Apple Silicon Laptop

Thursday, October 21st, 2021

Apple M1 Max

I started preparing for the new MacBook Pro by making sure that I had Universal Binary versions of all the apps I use on a daily basis. A lot of them were simple updates - and the latest versions would run natively on the Apple Silicon chips. But a few need a little help.

There are a few where I simply need to download the Apple Silicon version of the app:

and a few I read are in the process of creating native Apple Silicon versions:

and a few I've sent off support requests for to see if they are planning on delivering an Apple Silicon version of the app:

  • Base
  • PDFelement 7

One that I was a little surprised about was Dropbox. They have iOS, and iPadOS clients, but not a Universal Binary client - or even one that's specific to the Apple Silicon architecture. Seems odd that being the case, but it was a chance for me to drop my usage of Dropbox, not renew my $120/yr subscription, and just move all the files to iCloud+. After all, I'm already using iCloud, and with the upgrades to iCloud+, and the cost being less, it seemed like a good move.

So I moved all the files, let them sync up to iCloud, and then removed the files from Dropbox. Then I simply logged out of each device, and then my laptop, and finally cancelled by subscription on the website. It was interesting that they wanted to keep me at the Free Tier, so it seems there's no easy way to really wipe out your Dropbox account, but this is good enough. It's off my machines, and I won't have to worry about the emulation on the new laptop.

In all, not bad... most are converted. In order to update Homebrew, I think I'm going to uninstall the complete Intel Homebrew install, and then start by putting back only those packages that I need - Postgresql, Node, and AdoptOpenJDK. I think that will be far easier than trying to migrate all the Homebrew tools I have now, most of which I really no longer need.

It's going to be an interesting transition. 🙂

UPDATE: Some news about Homebrew and Apple Silicon. I did a little digging to see what the status was on the support for Apple Silicon for the packages I needed to have on Day 1. It's in interesting mix.

  • Java - it seems that AdoptOpen JDK has been renamed to Temurin, and the only ARM version is JDK 17. This means no more backward support for JDK 8 or JDK 11. This is going to then mean that I need to make sure everything is working OK, but I'm hoping it won't be bad.
  • Postgresql - the latest is Postgres 14, and it's ready to go on ARM. Good. 🙂
  • Leiningen - it appears to be OK, as it's just a script, so I think it's fine.
  • jq - this is ready to go on ARM. Good. 🙂
  • nodenv - this is ready to go on ARM. Good. 🙂

I'm sure there will be more support as the Mac machines all move to Apple Silicon, but it looks like I'll have only a few questionable apps on Day 1.

Ordered a New MacBook Pro M1 Max

Monday, October 18th, 2021

Apple M1 Max

Today, at Apple's Event, they introduced their newest MacBook Pros - based on the M1 Pro and M1 Max chipsets. They are pretty spectacular: great display, more ports, better thermal design... I have been hoping they would be this good, with the same basic RAM and SSD that I have now in my current MacBook Pro - and they did not disappoint. 🙂

The news I've received from folks with the original M1 Mac Minis is that they are amazingly fast, and quiet, and as the M1 Max is going to be even better than the M1, things are only going to improve. A little after the event ended, I ended up ordering one - should arrive the first week of November.

It'll be great to migrate things over and see how some of the apps perform on the new hardware. I'm betting it'll be exceptional.

Pre-Ordered iPhone 13 Pro

Thursday, September 16th, 2021

IPhoneX

Apple is doing something interesting with the iPhone 13 orders this year. In the past, they used to open up ordering at midnight, Pacific Time. This meant that it was 2:00 am local time for me, and I get up early to run, so it wasn't horrible - and given that the new iPhones sell out in a matter of a few hours, it was the only way to get one of the first batch.

Then in the last few cycles, they moved the starting time to 5:00 am Pacific Time, so that meant a 7:00 am start time for me - not bad at all. But there was still the load on the Carrier's APIs, and there would be issues with that, and all manner of other things, so this year they have again, changed things up.

After the Apple Event the Apple web site allowed for a sort of Pre-order, Pre-Order... You can go through all the steps of buying the new iPhone - selecting the size, color, capacity, communicating with the carrier, payment method - everything right up to the point of actually buying it. And then you wait for 5:00 am PT on Launch Day, and you simply finish the order. The iPhone is in your "Bag", and you just need to pay for it.

This gets around a lot of the surge of orders because no one can buy one until Launch Day, and it's the same starting time, but all the communication with the Carrier, etc. is now much more spread out in the days leading up to Launch Day. They haven't started shipping anything, and I don't believe they have even reserved units for sale - but they have done all the work needed to verify that you are who you say you are, and all your selections, so on Launch Day, there is much less to do.

Clever. 🙂 I like it a lot. I've got my phone on pre-order, pre-order, and on Launch Day, tomorrow, I just need to login and click once, and it's in the Pre-Order queue. Nice.

Getting Ready for Apple Silicon – CleanShot X

Thursday, July 22nd, 2021

CleanShotX

This morning I was thinking about the move to the upcoming M1/M2 MacBook Pros that are supposed to be coming out later this year, and I decided it was time to move off my old screen capture and annotation tool, Annotate, and move to something that's: 1) Supported... 2) Going to be built for Apple Silicon. And when I read a review about CleanShot and SnagIt, I decided to look into both - SnagIt first.

The reviewer had it right - SnagIt has way more than what I need, and the increased feature set means complexity that I just don't need. Annotate was great... simple, easy, it did all I needed. SnagIt is just too much. But CleanShot is right what I was looking for!

I needed something to make nice screen shots - both area and window-based. I also wanted to be able to draw arrows from the head to the tail, as several of the screen annotations I've used had used that, and my arrows are so much more precise because of it. Also, I wanted to have the white-outlined text so that it was easy to read - regardless of the image below.

CleanShot does all of those. It's just exactly what I was looking for. So I got the basic app, with the 1GB of storage, and we'll see how it goes. If I want to get more updates in a year, then I'll renew then. But I didn't need the "Pro" features like unlimited storage, and I really don't want to pay a monthly fee for software like this - it's not critical to what I do.

So here we go... and we'll see how this works out. I have high hopes. 🙂

Enjoying play.js on the iPad Pro

Wednesday, June 16th, 2021

NodeJS

This morning I pulled up play.js on my iPad Pro to run a simple project I built to hit a MLB stats site and extracts some data, and format it into a simple JSON output. It's nothing, really... a simple Express/NodeJS site that I used in learning Express... but it is just an amazing tool for writing Node services - with front-ends, or not.

It's really pretty nice - includes a full git client, and complete dependency searching and incorporation... it's all you'd really need if you had a Node service back-end, and a static assets front-end. I know it can do even more on the front-end, but I'm quite happy with the ability to use HTML/CSS/JavaScript to build the front-end - I typically don't build elaborate front-ends to validate the back-end service.

The one wrinkle I've seen with some Node dependencies that include non-JavaScript components - like downloaded commands. These are not going to run in play.js's environment. It has to be 100% Node and JavaScript. So... there are some limitations on the projects it can handle... but not many.

Wishing for new Apple Silicon MacBook Pros

Wednesday, March 24th, 2021

Apple Computers

Like many folks that are developers, I'm very interested in what the new 16" MacBook Pros with Apple Silicon will be like. Right now, I'm really focusing on a few key features I've read, and seen, on the 13" MacBook Pros with M1 chips: the Display handling, and the Operating temperatures.

Right now, I've got a couple of LG 5K monitors, and my 16" MacBook Pro can drive them, but the temperature of the laptop starts to rise, and then the kernel_task rises, and the box essentially becomes unusable. I understand all the reasons for the kernel_task, and how it keeps the machine from overheating. And I've blown out my recent-vintage 16" MacBook Pro, so it's not an obvious issue, but I get it... I'm driving big 5K monitors, and that heats up the laptop.

From what I've read, the new Apple Silicon MacBook Pro can drive one 6K monitor, or two 4K monitors - just like the new Mac mini. Which is nice, and I'm just betting that the new 16" MacBook Pros will be able to drive two LG 5Ks - like the current lot can. Which will be nice. And to have no fan noise - that will be the real treat.

Which comes to the point of the thermal environment for the new laptop. I get that they need to be able to cool the components, but I'm to the point that I don't Zoom or run Google Meet on the laptop as it just makes it too hot. I can run Zoom and Meet on my iPad Pro, and it's faster, better, quieter, and I don't have to worry about a long meeting contributing to my machine slowing down.

I know it'll be the end of this year to get the new machines, but at least the new iPad Pros will be out sooner than that - and that too, will be a very nice upgrade. 🙂

Getting Apache 2.4.46 + PHP 7.3.22 Going on macOS 11 Bug Sur

Friday, November 13th, 2020

Yosemite

This morning, with the update to macOS 11 Big Sur it was time perform the ritual of getting the old web development tools that I've used in the past going again - this time on macOS 11. Now I haven't used PHP in ages, and this looks to be the last time I'll have to worry about this, as Apple is going to drop PHP from their releases, and they have already dropped their Postgres support in PHP. But let's get done what we can.

Activating UserDir in Apache 2.4.46

As in the previous updates, the UserDir extension is not enabled by default, so we need to get that going right away. This enables the code to be run from the development directories, and that's a big time-saver. First, we need to enable the UserDir module in Apache, and then make a specific config file for the user in question. Start by editing /etc/apache2/httpd.conf and line 184 needs to be uncommented to read:

  LoadModule userdir_module libexec/apache2/mod_userdir.so

and then similarly on line 521 uncomment the line to read:

  Include /private/etc/apache2/extra/httpd-userdir.conf

Next, make sure that the file we just included is set up right for including the user directories. Edit /etc/apache2/extra/httpd-userdir.conf and line 16 needs to be
uncommented to read:

  Include /private/etc/apache2/users/*.conf

At this point, you need to make sure you have at least one file in the /etc/apache2/users/ directory for each user, like: drbob.conf:

  <Directory "/Users/drbob/Sites/">
      Options FollowSymLinks Indexes MultiViews ExecCGI
      Require all granted
  </Directory>

where the last line - Require all granted is new as of Apache 2.4, and without it you will get errors like:

  [Thu Dec 18 10:41:32.385093 2014] [authz_core:error] [pid 55994]
    [client fe80::7a31:c1ff:fed2:ca2c:58108] AH01630: client denied by server
    configuration: /Users/drbob/Sites/info.php

Activating PHP in Apache

The mext thing to do is to activate PHP in the supplied Apache 2 with macOS 11. This is line 187 in the file - /etc/apache2/httpd.conf and you need to uncomment it to read:

  LoadModule php7_module libexec/apache2/libphp7.so

and then verify a file called /etc/apache2/other/php7.conf exists and contains:

  <IfModule php7_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
 
    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>
  </IfModule>

which does all the other PHP configuration in a separate file to make upgrades easy.

Finishing Up

At this point, a simple restart of apache:

  $ sudo apachectl restart

and everything should be in order. Hit a URL that's a static file with the contents:

  <?php
    phpinfo();
  ?>

and you should see all the details about the PHP install - it's all there, as in older releases, but it was surprising to me to see that there was no longer any support for Postgres within the PHP version that was delivered with Big Sur. More to the point - the warning is clear - PHP will be dropped in a future macOS release. Until then, we still have:

  • PHP 7.3.22
  • MySQL 5.0.12
  • SQLite3 3.28.0

so things are still there - kinda... MySQL is still supported, for those that want that, and SQLlite3, which is likely my most logical choice, but in truth... this is progress. Folks don't do PHP development like they used to, and so it's going to go away. I'll miss it, but maybe Homebrew will have something - and I remember building it all from source before... so I can do it again - if I need to.