macos

An alternative method for keyboard input switching on macOS

macOS offers a variety of virtual keyboard layouts which are accessible through System Preferences > Keyboard > Input Sources. Because I spend about half of my time writing in Russian and half in English, rapid switching between keyboard layouts is important. Optionally in the Input Sources preference pane, you can choose to use the Caps lock key to toggle between sources. This almost always works well with the exception of Anki.

Scripting thumbnail image file creation on macOS

One of the sites that I manage uses a jQuery-based image gallery to display images in a grid. The script decides which thumbnail to use based on how large and image is needed. A series of suffixes à la Flickr^[Well, sort of. I don’t think this is exactly what Flickr uses; and I made up the _q suffix for the less than 500px image.] is used to signify classes of image size.

Setting up Arduino IDE with Heltec ESP32 module for macOS

Heltec WiFi Kit 32 ESP32 module The Heltec WIFI Kit 32 is an interesting little module that integrates a WiFi/MCU SoC and a small OLED display on a single board. If you want to set up the Arduino IDE to work with this device and you’re on macOS, this is for you. This particular ESP32 module has a number of impressive features: 240 MHz processor speed and 4 MB of flash memory.

Using macOS NSSpeechSynthesizer to generate audio content for Anki cards

As I’ve written before, I use Anki for Russian language learning. One of the skills to master in learning a foreign language is to quickly speak and recognize numbers. With a little help from macOS, I’ve developed a way of rapidly creating audible content of spoken numbers for my Anki cards. That’s the good news. The bad news is that as of right now, you’ll have to have Xcode and build the app yourself.

AppleScript and iTerm2

Among the many reasons I use iTerm2 in lieu of the macOS Terminal is its AppleScript support. I recently had the need to automate some tasks on my Amazon Web Services EC2 server in a way that takes advantage of iTerm2 AppleScript functionality. Use case I’ve found recently, that my screen sessions were disappearing. Although I haven’t completely excluded other causes, some have suggested that infrequently-reconnected sessions can be cleaned up.

Spotlight-searchable pinboard bookmarks

I use the excellent, dependable Pinboard service for managing my bookmarks. A one-time fee gives you lifetime access to the service; and there is an API that has fostered an ecosystem of desktop and mobile apps that interact with the service. Of course, Safari can synchronize bookmarks among devices; but it doesn’t allow tagging. Since tagging is a major part of my workflow, Safari bookmarks don’t work for me. So, here’s where pinboardspotlight.