Tag: mac

MacOS: Opening a Terminal from a folder in Finder (plus, taking and annotating screenshots)

In Windows I like that you can Shift-Rightclick in Explorer and select “Open command prompt here”. During development I often want to do the same on my Mac, and this feature is provided too, but not enabled by default. To turn it on, go to System Preferences > Keyboard > Shortcuts, select Services on the left, and then check the option “New Terminal at Folder”:

If you want to go in the other direction, you can easily open a Finder at your current folder in Terminal by running ‘open .’

A couple of bonus tips:

  • To take full screen screenshot on the Mac, press Shift-Cmd-3. A file will be saved on your desktop. To take a screenshot of a selection of the screen, press Shift-Cmd-4, then drag to outline your selection.
  • In the Preview app, there’s a neat feature under Tools > Annotate where you can annotate your screenshots with highlighted sections, boxes, arrows, text etc. Just open your screenshot file in Preview, and then you can easily annotate and save the image:

Phones, tablets, laptops, desktops – different form factors with different usage styles. Why Apple won’t compromise and merge iOS and MacOS

Following Apple’s announcement of the new MacBook Pro models today and the impressive looking Touch Bar, cnet have a fascinating interview (and timeline of Apple’s laptops from the original PowerBook through to the latest MacBook Pro models) with Senior VP of Marketing Phil Schiller, software engineering lead Craig Federighi and Apple’s Chief Design Officer Jony Ive.

Although the media focus is predominantly on the new Touch Bar, there’s several interesting quotes in the article on why we won’t be seeing a combined or merged OS or hardware device from Apple that combines iPhone/iPad touchscreen functionality with the laptop format of the MacBook product line – Schiller said:

“We did spend a great deal of time looking at this a number of years ago and came to the conclusion that to make the best personal computer, you can’t try to turn MacOS into an iPhone. Conversely, you can’t turn iOS into a Mac…. So each one is best at what they’re meant to be — and we take what makes sense to add from each, but without fundamentally changing them so they’re compromised.”

I’ve agreed with this line of thought for a while, and discussed this last year when Tim Cook said something very similar.

While it might be immediately obvious to some that the way you interact with a smart phone that fits in your hand is a completely different experience to how you interact with a computer while sitting at a desk, Microsoft’s (failed?) attempt at combining both of these usage styles into a single phone device with Continuum that you can use as a phone or plug into a dock and use as a desktop has always seemed to me to be a massive compromise. How you use a phone with a small screen and limited input capability is so completely and radically different from how you interact with a desktop computer with a keyboard, mouse and large LCD screen, why you would even try to combine these two experiences into one device is just beyond me.

Anyway, I’m pleased to heard Apple reiterating on their understanding of how different devices have different capabilities. Until a radical new approach comes along for how you interact with your devices where the reduced physical size of a portable device is no longer a constraining factor, a phone is still best as a phone, and your desktop or laptop is still best as what they do. Even in this “Post-PC” era, there’s still a place for both.

 

Replacing a MacBook Pro optical drive with a SSD: stripped screws a-plenty

Older model MacBook Pros typically came with a rotational hard disk and an optical  disk. Some models had a 6Gbps SATA controller for the HDD and a 3Gbps controller on the optical drive bay. It’s worth checking in the System Information tool if the controller for the optical bay is not slower than the HDD bay. If it is then you might want to consider swapping out your HDD for the SDD. If both bays are 6Gbps on both sides, then it’s ok to put an SDD in the optical bay and not limit it’s throughput.

My mid-2012 MBP has 6Gbps on both bays:

HDD:

Optical bay:

 

I used an OWC drive doubler bracket to put my SSD into my optical bay. Here’s the patient open and ready to receive it’s new drive. Existing HDD at the top right, optical drive bay bottom right. The bag of tools comes with the OWC bracket:

 The OWC bracket is more pricey at $29 on Amazon, compared to the cheaper alternatives at < $10, but the difference in price seems to be you get everything you need in be box, including tools, replacement screws, and a manual. The manual is incredibly detailed and covers step by step with photos for each MBP model that the bracket fits. Find you model, follow the steps, done.

The replacement probably should take you less than an hour, but I ran into one of the soft black screws that wouldn’t budge and it stripped pretty much instantly. I tried the elastic band trick, I tried supergluing a screwdriver to the screw.., no good.

Drilling out a stripped screw is probably the last resort, unless you can reach it with a dremel and cut a slot into the top. This one was recessed, so did some reading around and a ‘Grabit’ seemed to be the way to go.

The screw in question for me was the larger one in step #8 in iFixit’s instructions here. The instructions even say:

Take care, as these screws are unusually easy to strip

Yep. I think that should actually say:

These screws are guaranteed to strip. Make sure you have tools at hand to remove them when stripped.

The Grabit Micro #1 and #2 did the job for me. The #1 seemed the one to use. Using the drill end, it took a while to drill a whole into the top of my stripped screw. Flipping the drill bit around to the extraction end, it didn’t catch like it was supposed to. At that point I thought my only option was to drill the screw out, so I swapped the next up size and started slowly drilling, but the drill bit end actually caught inside the hole. Since the drill and extractor ends both turn anticlockwise, it immediately started to remove the screw. Phew!

So hows the SSD? It’s awesome. Whereas before El Capitan seemed to take more than a minute (I hadn’t timed it, but roughly) to cold boot on my i7 2012 MacBook Pro, from a clean install on this SanDisk SSD, it boots to logon in around 6 to 7 seconds. Pretty damn incredible. It boots from cold it the same time it would take to come out of sleep from my HDD. And using OS X is incredibly damn fast and fluid. My 2012 MBP has a couple more years of life to go 🙂

Creating an OS X El Capitan install flash drive

Format the USB Flash Drive using Disk Utils:

http://www.macworld.com/article/2990837/storage/how-to-format-a-startup-drive-in-el-capitan.html

The volume name in the next step is /Volumes/name-you-gave-the-volume-in-the-first-step.

Copy install files to the Flash Drive using createinstallmedia:

http://www.macworld.com/article/2981585/operating-systems/how-to-make-a-bootable-os-x-10-11-el-capitan-installer-drive.html

To boot from the flash drive, reboot your Mac holding down the Option key and the choose the icon for the flash drive.

Weblogic Portal 10.3.6 generic installer on Mac OS X – Insufficient Disk Space error

Trying to use the portal103_generic.jar installer on Mac OS X 10.11.1 gives this error even though you have plenty of free space:

A quick Google turns up this question and answer. Quick fix, run passing this option: -Dos.name=unix, so:

java -Dos.name=unix -jar portal103_generic.jar

Although others reported this avoided the issue, I then got this issue instead:

Exception in thread "chmodFile" java.lang.Error: Unix is not a supported OS platform.
 at java.lang.UNIXProcess$Platform.get(UNIXProcess.java:164)

Following additional suggestion here, using -Dspace.detection=false instead avoided the issue.

Microsoft offers to buy your old PC and Mac gear to encourage upgrades to Windows 10

Microsoft really want you to upgrade. Not content with ‘accidentally‘ forcing upgrades on some Windows 7 and 8 users that hadn’t upgraded yet, apparently they have an old equipment trade in program if you buy a new PC running Windows 10. You can get upto $200 for an old laptop, but for a MacBook you can get $300. Really? Microsoft values old Macs more than old PCs. You’d have to give me far more than $300 to trade in even an older MacBook. How about buy me a new MacBook Pro, throw in the Windows Sourface for free, and then when I’m convinced I really don’t like Windows then I still have a new MBP. That sounds like an awesome deal.

Reminder to self: MySql on Mac OS X is installed to /usr/local/mysql[version]

Apparently it’s been a while since I started up mysqld on my Mac for development (as I’ve been using MongoDB for a lot of my local dev). Anyway, apparently also I had already written a short article over a year ago to remind myself that the default location for the Mac install of MySQL is to /usr/local/.

Reminder to self again: remember to search your previous posts to remind yourself where MySQL is installed.