Skip to content

OS X

How to enable ccache with OS X MacPorts

I’ve had a 13″ Macbook for about your years now. When I learned about MacPorts I was really happy to know I could run newer software, and compile things to my liking. These days I run a development environment on my Macbook, all built using MacPorts. This post covers how to leverage ccache in compiling your MacPorts. ccache is a compiler cache utility that increases the efficiency of your compiles by reusing cached build data, often improving build times by 5-10 times! Step 1: Install ccache sudo port install ccache Step2: Edit macports.conf” Open /opt/local/etc/macports/macports.conf in your favorite editor. Find the line ‘configureccache’ (near line 65) configureccache no and change it to configureccache yes You’re done! New compiles will now use ccache. note: ccache stores it’s cached date in your home directory, ie; /Users/$username/.ccache. It defaults to a maximum cache storage size of 1G. You can find out more about the ccache settings via the ‘ccache -s’ command. Read more

Fix Home and End Keys: Mac OS X

One of the things that has long bugged me about Mac OS X (one of the few things!) is the different way that the Home and End keys function inside a document. I have long been used to Home moving to the beginning of the current line, and End moving to the end of the current line (both on Windows and Linux machines), but on OS X they seem to move to the end of the document and the beginning of the document. After months of working on OS X I have yet to get used to this functionality so today I set out to find a solution. This is what I found. I quickly found that there are a lot of people with this same gripe. Google is ripe with suggestions. Some of them manual keyboard re-mapping tricks, others suggesting the “Mac way” to achieve the same, and some with third-party software solutions. Read more

Quickly Lock Your Screen: Mac OS X

I’ve been using my Mac more and more while I’m at work these days and one of the things that I quickly started to miss was the Linux keyboard shortcut for locking your screen (ctrl-alt-l) when you’re going to be away from your desk. The first few times I simply resigned myself to trust my office mate, but that wasn’t going to cut it long-term. I set out to find a solution to locking my screen while I was going to be away from my Mac. This is what I found. There are actually a number of solutions that I found. Some require third-party software. Others require creating dock icons to launch command-line tools. The solution I came up with requires no third-party software, custom dock icons or arthritis-inducing keyboard shortcuts. This uses easily configurable options that can also easily be undone if desired. I used Hot Corners. If you’re not familiar with Hot Corners, it is the ability to use your mouse and the four corners of your desktop to achieve additional functionality. Read more

Remove Unneeded Languages in Mac OS X

I ran into this little tip today on Command-Line-Fu. It automagically finds and deletes all non-english language sets installed on your machine. This is, of course, a Mac OS X tip so you wont get very far running it on your Linux machine. I have two OS X desktops at home so I found it applicable. I know there are quite a few of you closet OS X users out there as well. We’ll just let this one be our little secret. sudo find / -iname "*.<span class="searchhit">lproj</span>" -and ! -iname "en*" -print0 | tee /dev/stderr | xargs -0 rm -rfv<br /> Can anyone suggest making this command any more efficient? Just looking at it (without testing) I may have tried something like this: sudo find / -iname "*.lproj" -and ! -iname "en*" -exec rm -rf {} \;