I had a situation where I needed to pass code to Python in the form of a single command instead of a script file. While this is easily done by invoking Python in command mode, the code contained a conditional statement that caused Python to throw an error.
Secure Erasing a Mac Fusion Drive
Before selling my late 2015 27″ iMac Retina 5K I wanted to secure erase its 1TB Fusion Drive consisting of a 24GB SSD and 1TB HDD. Secure erasing an HDD is simple enough using the Security Options in Disk Utility
, but for Fusion Drives and SSDs this option is not available. To secure erase the iMac’s HDD I first needed to break the Fusion Drive into its constituent parts using Terminal
.
Re-opening Full-Screen Applications in OS X Lion. Hit or Miss?
A much touted feature of Mac OS X Lion is the ability to use applications in full-screen mode. It’s easy enough to make an already open application full-screen, but I’ve had limited success re-opening applications full-screen using the initial public 10.7.0 release of Lion.
Syncing OS X Address Books and iCal Calendars across Multiple Macs using Dropbox
Entering File and Folder Paths on the macOS Command Line
The one thing that trips me up time and again when using the command line in Terminal or other terminal emulator is being able to navigate the directory structure and target files or folders. After struggling getting the correct file or folder path I’m usually greeted with No such file or directory reminding me that the command line doesn’t like spaces in file and folder paths.
With that in mind here are a few ways to enter file and folder paths on the command line.
Setting Dimensions of OS X Finder Windows
One small annoyance I have with the Mac OS X Finder is its apparent inability to let me set a default Finder window size. However many times I resize windows with the mouse, the Finder will eventually reset them to some arbitrary dimensions.
If, like me, you find this aspect of the Finder’s behaviour particularly irksome then try this AppleScript.
Starting XAMPP’s Apache Server at System Startup on Mac OS X
Until I recently switched to XAMPP I had been using MAMP to provide a local server environment on my Mac. A small but none the less important feature of MAMP is an option to have the Apache and MySQL servers started when you open the application. So, by checking this option and including MAMP as a Login Item my MAMP servers were up-and-running when I logged in. Unfortunately, XAMPP has no such option. Including XAMPP as a Login Item merely opens XAMPP Control.app and I have to start the servers manually. An extra step I’d rather not have to do.
So, how can I have my XAMPP servers running whenever I login? The answer, by using a daemon.
Recent Comments