iCloud Drive stuck uploading and downloading files in Mac OS X Mojave

Recently, my MacBook Pro, running Mac OS X Mojave, got into a state in which the Finder wasn’t uploading or download files to and from iCloud Drive. Since I couldn’t find any solution to this through Googling, I wanted to document how I solved the problem for others who may be experiencing the same.

I think, but can’t be sure, that the problem was related to allowing GitHub Desktop to store my repositories in the “Documents” folder, which is synchronized with iCloud Drive.

One of my repositories had literally tens of thousands of files, and even though I had deleted it long ago on my Mac, I discovered through troubleshooting that it was still present in iCloud Drive, when accessed via the web.

To solve the problem, after moving my GitHub folder outside of Documents, I then backed up all the files in Desktop and Documents on my Mac that I need, and disabled “iCloud Drive” in the iCloud area of the system preferences, and instructed the Mac to delete all the local files.

I then went into iCloud Drive via the website, and started deleting everything from there.

Step one was selecting my repo folder in Documents, and deleting it.

Step two was going into “Recently Deleted”, and then purging the folder from there.

But this turned out to be very confusing, because although the purging of the repo folder appears immediate in the browser UI, it’s actually a very long process that’s happening—in the browser! While that’s going on (with no UI feedback) other files and folders in “Recently Deleted” area appear grayed out. You can select them, but you can’t delete them.

After a while of frustration, an error message popped up saying certain files in my repo folder couldn’t be deleted, at which point the folder re-appeared in the “Recently Deleted” area. Ultimately, I had to go into the folder, and delete its contents in small batches. Once that whole folder was deleted, the grayed out files and folder then lit up, and could be deleted themselves.

So the fact that deletions are getting processed one by one in the browser, but there’s no UI to indicate that, can cause terrible confusion when trying to perform the kind of mass cleanup that I was doing.

In the end, when everything was finally deleted and purged, I re-enabled iCloud Drive on the Mac, and everything returned to normal.

Fake profiles on Upwork

When sourcing work at Upwork, we tend to look for staff who are located in Europe, so that we have the chance to work in our timezone and have face-to-face meetings. A big problem, however, is fake profiles—people who are obviously not from Europe, posting profiles pretending they are.

My recent encounter with “Thomas Wang”, presumably from “Ghent, Belgium” is a case in point:

How to selectively run Keyboard Maestro macros in a synchronized environment

A challenged I’ve always faced in running Keyboard Maestro on multiple Macs, is the maintenance of macros that are common to all, i.e. when updating a macro on one machine (say, changing the API keys of a service I’m accessing), I have to remember to go make the same updates on the others.

Keyboard Maestro provides a solution to this problem, by allowing you to synchronize your macros across multiple machines. Their implementation, however, and in contrast to say, Hazel’s folder-scoped implementation, is all or nothing—meaning that you can’t have macros on one machine that don’t exist on the others. And that can become a problem, especially with macros that are scheduled to run periodically.

Keyboard Maestro provides two approaches to address this problem:

The first is the ability to, for any given group (folder) of macros, to click, “Disable on this Mac”.

Unfortunately, there’s a number of shortcomings to this option. For example, anytime you add a new group of macros to a given machine, you have to remember to potentially go around disabling them on the others.

The second approach, and better in my opinion, is to condition the execution of any macro on the UUID (universally unique ID) of the machine on which the macro is running. Here’s an example of how this works.

The first step is to maintain a macro that determines the UUID of the current machine, and defines a list of named UUIDs for machines you’ll later be referencing. I run the following macro daily, and whenever I add a new machine, I’ll add its UUID to the list of named machines by temporarily running the disabled action that copies the current machine’s UUID to the clipboard.

With this in place, I can now condition the execution of other macros by machine. The following is an example of a macro that runs daily, and quits FaceTime on my MacBook Pro.

If I wanted this macro to run on two machines, I could add a second UUID check, and change the condition to “any”.

While this approach requires additional effort in creating your macros, it provides big benefits in being able to manage from a single machine, the conditioned execution of macros on all of your machines.

How to perform a currency lookup in a Numbers spreadsheet

Apple recently introduced in the Numbers spreadsheet the ability to pull live stock prices from the internet, making it now possible to track portfolio performance.

To access this feature, you use the STOCK function:

Since the feature pulls data from the Yahoo finance service, the symbols you should use for reference are those used at Yahoo. For most stocks that I’ve come across, the symbols are the same as those used at Google, but they do seem to vary slightly for non-US stocks and currencies.

To track the Euro/USD exchange rate, the symbol used at Yahoo is “EURUSD=X”, but using this symbol in the Numbers STOCK function returns an error. The solution, as I found in this discussion at Apple is to use the CURRENCY function: