All posts by mactips

Creating custom shortcuts with apostrophes

I’m running OS X localized in French and recently started using custom keyboard shortcuts extensively. But I’ve come across a few menu items for which I could not create a shortcut. I realized that all these items contained apostrophes. Not the same apostrophe as the one on the keyboard though (‘ vs. ‘ which is a single quote, ascii 39).

I managed to find the right char in a *.strings file inside the Ressource/French.lproj folder of the application package (Teminal.app in this case), which I could then copy and paste in System Preferences

10.9: Disable App Nap System Wide

The Finder/Get Info checkmark for preventing App Nap sometimes disappears, seemingly at random. Maybe the app updates itself, or just writes something to the application directory and the checkmark is gone. The next day your overnight render is at 10%. So in Terminal, type:

defaults write NSGlobalDomain NSAppSleepDisabled -bool YES

This seems to prevent App Nap completely, looking at the Activity Monitor

10.9: Assigning Tags by keyboard shortcut in Finder

I’m not sure if this has been covered sufficiently already, but I’ve heard lamentations by various writers about the lack of a keyboard shortcut to bring up the file-tagging popup in the Finder. While none is provided by default, one can easily be set up.

In previous versions of OS X, the File menu had Label: followed by the row of colored cells. In Mavericks, the row of tags is still there, but the un-selectable Label: has changed to the selectable Tags…, which opens the tagging popup menu next to the selected file.

This process may already be familiar to MacOSXHints readers. Go to System Preferences

Creating a kill switch for the OSX VPN client

I live in China so I have to use VPN all the time if I want any kind of stable connection to sites in the west. Unfortunately the VPN will at times randomly disconnect and then all traffic will immediately start going over chinese Internet again. While this is not a big deal really, I would just prefer not to be logged in to Facebook or Gmail and have my traffic open to be sniffed by the great firewall. It also occurred to me that many people use VPNs in the states in order to safely torrent.

I know some VPN providers have ‘Internet kill switches’ for their VPN that will cut your Internet connection incase of a disconnect and make sure you are not leaking anything. The problem with these is that they are almost all using openVPN, while I use L2TP over IPSec for my VPN. I searched for a long time for a way to do this and could not find one so I thought of a way to do it on my own. The following is how I set my system up. Please keep in mind that I am not an experienced Term …

Source: Mac OSX Hints

    

Automator Service to toggle the alias bit

Aliases in OS X are identified to the system by an attribute referred to as the alias bit. This hint provides a very simple way to be able to toggle the alias bit of selected files within the Finder.

There may be some need to be able to toggle the alias bit of files from within the Finder. For example, I found that using Bittorrent Sync to keep files synchronized across multiple devices is very useful and a real time saver, but suffers from a bug in the OS X version, that causes aliases to lose their status as aliases. I traced the problem to the alias bit not syncing and though the developers continue to promise to fix it, I got tired of waiting.

So I put together an Automator action that installs as a service in OS X. It adds a Service to the contextual menu that will toggle the alias bit on any file or folder in the Finder. It works on multiple files at once. Just select what you want, right click, and choose ‘Toggle Alias Bit.’ I made it a toggler rather than …

Source: Mac OSX Hints

    

Add Multiple URLs to a Calendar Event

I frequently want to add multiple URLs to Calendar events. Of course, you can put them in the Notes section, but given that there’s a URL field, it seems a little kludgey. This solution is kludgey too, but perhaps a bit less so.

Drag the additional link(s) to the Finder to create a .webloc file; then drag that file to the attachment field for the event.

You can double-click the file to open the link, which is better than the link being non-clickable in the Notes field, where you would have to highlight and right-click (Control+click). The URL won’t appear in the body of an email when you send an event to someone, but it will be in the attached .ics file.

[crarko adds: I haven’t tested this one.]

Source: Mac OSX Hints

    

Apple Announces Q214 Profit of $10.2 Billion, Revenue of $45.6 Billion

By Alex Brooks Apple’s Quarterly Earnings until Q214
Apple today announced financial results for its second fiscal quarter of 2014 which ran from January 1, 2014 until March 29. Apple posted revenue of $45.6 billion and net quarterly profit of $10.2 billion, or $11.62 per diluted share. These results compare to revenue of $43.6 billion and net profit of $9.54 billion, or $10.09 per diluted share, in the year-ago quarter.
Gross margin was 39.3 percent compared to 37.5 percent in the year-ago quarter. International sales accounted for 66 percent of the quarter’s revenue.
Apple reported the following number of shipments for its products during the quarter:
43.7 million iPhones compared to 37.4 million in the year-ago-quarter
16.35 million iPads compared to 19.5 million in the year-ago-quarter
4.1 million Macs compared to 3.95 million in the year-ago quarter
2.76 million iPods compared to 5.63 million in the year-ago quarter.

“We’re very proud of our quarterly results, especially our strong iPhone sales and record revenue from services,” said Tim Cook, Apple’s CEO. “We’re eagerly looking forward to introducing more new products and services that only Apple could bring to market.”
“We generated $13.5 billion in cash flow from operations and returned almost $21 billion in cash to shareholders through dividends and share repurchases during the March quarter,” said Peter Oppenheimer, Apple’s CFO. “That brings cumulative payments under our capital return program to $66 billion.”
Apple provided the following guidance for its fiscal 2014 third quarter:
revenue between $36 billion and $38 billion
gross margin between 37 percent and 38 percent
operating expenses between $4.4 billion and $4.5 billion
other income/(expense) of $200 million
tax rate of 26.1%

Source: World of Apple

    

Create a Fusion Drive with a Recovery Partition

There are many step-by-step guides on the internet that explain how to add an SSD to an existing Mac, and create a ‘Fusion Drive’ that has the speed of an SSD, but also the capacity of a Hard Drive. All these guides fall short in one way that was important to me.

Creating the Fusion Drive the way these walkthroughs say (including OWC’s exceptional guides), destroys the Recovery Partition that exists on the drive. Without a Recovery Partition, you cannot enable FileVault2, and will need some other external boot drive if you ever need to perform maintenance on your internal drives. For a laptop computer that might be far from home, not having a Recovery Partition was unacceptable to me. Also note that if you buy a Mac from Apple today with Fusion Drive, it DOES come with a Recovery Partition, so it is indeed possible to do.

It turns out that Apple’s Core Storage technology is more flexible than these walkthroughs give on. You can enroll an individual partition of a …

Source: Mac OSX Hints

    

Using Time Machine on unsupported volumes

I wanted to use Time Machine on my exFAT hard drive, but turns out that these volumes aren’t supported from Time Machine! There is a very simple way to use Time Machines on unsupported hard drives, as long as you follow these instructions carefully you shouldn’t have any issues at all.

First, connect the unsupported volume (in this case, an exFAT external hard drive.) When it mounts, open the Terminal and type these commands, substituting ‘My External HDD Name’ for the name of the unsupported volume.

cd /Volumes
cd ‘My External HDD Name’

Next, type this code, substituting for your needs:

hdiutil create -size 320g -type SPARSEBUNDLE -fs “HFS+J” MacBook-Backup.sparsebundle
open MacBook-Backup.sparsebundle

Here, a 320GB sparse bundle named ‘MacBook-Backup’ is being made and mounted. You can change these values as you see fit. From herein, I’ll refer to the sparse bundle name as ‘MacBook-Backup’.

Source: Mac OSX Hints

    

10.8: AppleScript to close iCal Alerts

I’d just installed OS X 10.8, and booted to find the right side of my screen covered in Birthday and Calendar notifications! Since installing I’ve clicked ‘Close’ on way too many iCal notification alerts.

Here’s a script to close them all for you in one fell swoop. Since I still want iCal to popup a Notification alert for event alarms I’ve set, I don’t want to simply disable all the iCal notifications (or set them to temporary banner alerts).

However, it still occurs that sometimes a small pile of alerts have accrued while I was away from the computer, and I really hate hitting ‘Close’ a bunch of times.

So, followng is a script to simply close all the piled-up Notification Alerts. The script was put together using these two webpages for inspiration: http://macosxautomation.com/mavericks/notifications/01A.html (most of the nice code comes from here) and …

Source: Mac OSX Hints