mac

Why is my MacBook warm when the lid is closed (in sleep mode)?

When I woke up last night it was a little windy outside, so I decided to unplug my MacBook Pro because the power tends to flicker here. When I picked up the MacBook I noticed that it was very warm, even though the lid was closed and it was in sleep mode. This morning I decided to dig into the “Why is my MacBook hot even though the lid is closed and it’s in sleep mode” question.

Notes on looking at MacOS application/process memory usage

Very briefly, I spent a little time today trying to understand how much memory/RAM a Java/Swing application was really using, and these are my notes from that excursion. Note that the app is bundled as a MacOS/Java app I named AlPad, but from some system perspectives it is only seen by the name JavaAppLauncher. Here are my notes, which will hopefully be useful to me in the future:

Apple design: Jonathan Ive design interview quotes

This article contains a collection of quotes on design from Apple designer Jonathan Ive (or “Jony Ive,” as Steve Jobs called him). (Note: He prefers to refer to himself as a “builder” or “maker” as opposed to a designer.)

For those who don’t know of him, Jonathan Ive is credited with designing almost every Apple product since 1997. Given that very long string of success, I became interested in what Mr. Ive has to say, and to that end, here’s a collection of Jonathan Ive design interview quotes I’ve gathered over the last few years.

How to use the Linux ‘scp’ command without a password to make remote backups

Summary: How to create a public and private key pair to use ssh and scp without using a password, which lets you automate a remote server backup process.

Over the last two years I've ended up creating a large collection of websites and web applications on a variety of Linux servers that are hosted with different companies like GoDaddy and A2 Hosting. I recently embarked on a mission to automate the backup processes for all these sites, and as a result of this effort, I thought I'd share what I've learned here.

How to fire MacOS notifications with AppleScript and Scala

Table of Contents1 - A “Hello, world” MacOS AppleScript notification2 - AppleScript: Mac notification with a sound3 - How to add a title and subtitle to your notification4 - Running from Scala (or Java)5 - See also6 - Summary

Summary: This tutorial demonstrates how to fire MacOS system notifications with AppleScript and Scala (or Java).

In this article it helps if you already know a little bit about AppleScript, though that’s not completely necessary. Near the end of the tutorial I show how to invoke the AppleScript code using Scala, so feel free to skip down to there if you just want to see that — you can always read the stuff at the top for reference later.

Scala error: Shell scripts hang indefinitely on MacOS 10.13 and 10.14 (won’t run)

If you run into a problem where a Scala shell script won’t run on MacOS — it hangs indefinitely without doing anything — hopefully this bug report will help. The solution is to change this line at the beginning of the Scala shell script:

exec scala -savecompiled "$0" "$@"

to this:

exec scala -nocompdaemon -savecompiled "$0" "$@"

I just had this problem with Scala 2.12.x and Java 8 running on MacOS 10.14.4, and I can confirm that adding -nocompdaemon solved the problem for me.

A shell script to change between MacOS dark mode and light mode

If you want to create a shell script so you can change between MacOS dark mode and light mode from the Terminal (Unix) command line, put this source code in a file and name it something like dark:

osascript -e \
'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode'

Then make that file executable, and make sure it’s on your PATH. Now you can type dark to toggle back and forth between dark mode and the regular light mode:

How to batch-convert Mac BMP, JPG, PNG image files, free

Mac batch image conversion FAQ: How can I “batch convert” images from one image format to another on a Mac, such as BMP to JPG, or PNG to JPG?

As I mentioned in my earlier Mac batch image resizing tutorial, the Mac OS X Automator application is my new best friend. Besides letting you easily batch resize images very easily, the Automator also lets you easily batch create thumbnails for images, and also lets you convert images from one image format to another (BMP to JPG, PNG to JPG, etc.).

Here’s a quick look at how to use the Mac Automator to “batch convert” images from one file format to another, including image file formats like BMP, GIF, JPEG, and PNG.