How To Associate All Log Files with MacVim

Author: , April 12th, 2017

You can associate a file extension with an app (such as MacVim) via the “Info dialog”. Just select the file and hit Cmd-i, then go to the “Open with” tab, select app and hit “Change all…”. This will change the default application for that file type.

How To Find the Grab Hand Move Tool in Preview

Author: , April 11th, 2017

Press Option+Space and the cursor will change to the grab hand move tool. Roll your mouse wheel for vertical scrolling, hold down shift to switch to horizontal scroll mode.

How To Reduce the Size of a PDF Using Ghostscript

Author: , February 4th, 2017

Make sure you have Ghostscript installed, then: 1 gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS="/ebook" -sOutputFile=output.pdf input.pdf gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=”/ebook” -sOutputFile=output.pdf input.pdf -dPDFSETTINGS={value} where {value} is one of: /screen – the lowest resolution and lowest file size, fine for viewing on a screen /ebook – mid-range resolution and file size /printer – high-quality […]

How To Send Email From the Command Line on MacOSX 10.10.5 Yosemite

Author: , January 29th, 2017

I wanted to send email from cron for various reasons, but the emails would bounce with an error 554: 554 5.1.8 : Sender address rejected: Domain not found Clearly, Postfix was using the “internal” hostname of myappledesktop.local (MacOSX has TWO hostnames! also, myappledesktop.local is not the real hostname ;-). So, I needed two things: 1. […]

How To Fix Safari Using https instead of http

Author: , September 30th, 2016

For the Mac, you need to do three things in a row: 1. Quit Safari 2. Delete ~/Library/Cookies/HSTS.plist 3. Reboot

How To Install a .pkg file from the Command Line on MacOSX

Author: , August 12th, 2016

sudo /usr/sbin/installer -pkg /path/to/yourFile.pkg -target /

How To Fix “dyld: shared cached file was build against a different libSystem.dylib, ignoring cache”

Author: , July 28th, 2016

MacOSX 10.6.8 Snow Leopard running on a Mac Pro 2009 8-way After a system crash, using the backup drive, this error started to appear: dyld: shared cached file was build against a different libSystem.dylib, ignoring cache To fix it, execute the following in Terminal: sudo update_dyld_shared_cache -force As always, YMMV!

How To Create a Bootable MacOSX USB Flash Drive

Author: , June 11th, 2016

As the root user, execute: “/Applications/Install OS X El Capitan.app/Contents/Resources/createinstallmedia” –volume /Volumes/{USB_DRIVE_NAME_HERE}/ –applicationpath “/Applications/Install OS X El Capitan.app” Be sure to include the required double-quotes, or use backslashes to escape the spaces in the path. Full instructions may be found on the Apple site: https://support.apple.com/en-us/HT201372 Turn on your Mac by pressing the power button Press […]

How To Eject a Volume from the Terminal Command Line in MacOSX

Author: , December 8th, 2015

As always, YMMV… 1 2 3 4 5 6 7 8 9 #!/bin/bash # Usage: eject [fullpath to mount point] DISK="${1:-/Volumes/YourUSBFlashDriveName/}" df -h "$DISK" > /dev/null 2>&1 if [ $? -eq 0 ]; then    diskutil unmountDIsk `diskutil list "$DISK" | grep ^/dev/` else    echo Volume $DISK is not mounted…skipping. fi #!/bin/bash # Usage: […]

How To Export Apple Email Rules

Author: , November 10th, 2015

Quit Mail. Look for a file called MessageRules.plist under ~/Library/Mail. Depending on your Mail version it could be under ~/Library/Mail/V2/Maildata as well. Copy that file. It can be edited with vim or the PList editor. I find it much easier to work with as text in vim.