Capturing Screen Shots on Mac OS X

I’ve had reason to capture rather a lot of screen shots in recent weeks and find the following Mac keyboard shortcuts very useful:

Shortcut Description
Command-Shift-3 Captures entire desktop (saved as PNG file on desktop)
Command-Ctrl-Shift-3 Copies entire desktop (saved to your paste buffer)
Command-Shift-4 Captures portion of desktop (saved as PNG file on desktop)
Command-Shift-4 + Spacebar Captures current window (saved as PNG file on desktop

There are lots of other variations on the above, which are described nicely  here.

How to reduce the size of a PDF file on a Mac

This one’s been bugging me for several weeks so finally got around to finding a proper solution. Basically, if someone sends you a PDF file with some photos in it, the chances are they didn’t think of reducing the picture quality (in the original document) before creating the PDF. As a result, the PDF file can end up being enormous, for no obvious reason to the reader.

While I managed to find out how to tackle the problem from inside the likes of Microsoft Word (better options in Office 2011), I am often without the original document, so what to do there (on a Mac)?

Well, as it happens, Mac Preview does have a way of doing this which I found out about here, and while it worked well for me (PDF files were mostly text with 2-3 pictures anyway), I have seen comments on the above article questioning the quality of the resulting file. Still, it may work for you too.

HOWTO: Flush DNS cache on Mac OS X

Had some strange behaviour with DNS on Mac OS X earlier today. Made a change inside DNS and waited the required amount of time for the TTLs to expire. Then verified that the new IP address was resolving (using both dig and nslookup).

However, my system was still trying to use the old IP address when I tried a simple ssh or telnet command.

In the end, I discovered how to flush my local DNS cache, which fixed the problem. You can do this as follows:

$ dscacheutil -flushcache