Product Development in Brisbane

Archive for the ‘OS X Tools, Tips and Tricks’ Category

Finding Large Files on OSX

Monday, June 16th, 2008

After a recent security push at ephox (highlighted by a stolen laptop, and then me forgetting that I left my laptop in the office overnight), I've been working on freeing up some space on my laptop so I can turn on FileVault. A quick search of the internet found some great tools for doing this. My weapon of choice was Disk Inventory X. It presents your drive as a tree map, coloured by file type. I was quickly able to find the large files to kill (a couple of 1 GByte hprof files, and some large logs were the guilty parties on my machine).

Disk Inventory X is a good little utility for helping to cleanup up your machine.  If you are ever in need of a tool for OSX to find large files, it is well worth using.

Memory Settings for Eclipse on OSX

Tuesday, May 13th, 2008

For the regular readers of my blog, you may be wondering why I am stepping over to the dark side, and using Eclipse. Not to fear – it is just for an Eclipse plug-in. Using the right tool for the right job is important to always do.

When recently using the SAP Memory Analyzer tool to look at a large (1GByte) hpprof output file, I was running out of Heap space, so was lookin for where to set the -Xmx and -Xms settings on Eclipes. It was somewhat harder to find than desired, and the internet didn’t tell my as quickly as I wanted, so here’s the answer (while the video at http://www.brooksandrus.com/bog_assets/screencasts/eclipsejvmheap/ was cool, a simple text blog entry would have made me happy).

The eclipse.ini file in Eclipse.app/Contents/MacOS is the file that needs to be edited. (not the one that for me was close in location /Applications/eclipse/configuration/ eclipse.ini was bad, /Applications/eclipse/Eclipse.app/Contents/MacOS/ eclipse.ini was good).

After finding the right eclipse.ini, setting the memory is straightfoward. Simpley update the -Xmx and -Xms settings (see: The Sun Tuning java guide for what these do if you don’t know).

OSX RDP Client

Thursday, December 20th, 2007

I’ve been using the Microsoft RDP client for OSX for a couple of years now.  It is functional, and allows you to easily connect to windows servers, and perform administration tasks on them.  It does have a couple of limitations, the most crushing of which is the lack of an easy way to have two sessions connected at the same time.  As I’m currently working on splitting out a database from an application server, and will be doing heavy development administration of both boxes, this limitation is a killer, so I’ve just done a google to find out my options.

Via the Blogosphere I found coRD (a Cocoa Remote Desktop tool). 

 It is great.  Not only does it solve the problem of being able to connect to two servers at the same time, but it does it in a nice apple look and feel.  Going to my remote desktops doesn’t make me shudder anymore.

The ability to keep all the servers in a single window, and then navigate through them is particularly useful.  I also like the server drawer option.  I’m not a big fan of using a full screen mode to a remote server, but it is available for those who do.  

The only feature from the Microsoft RDP client that I miss is the automatic sharing of my drive.  It made for an easy way to transfer files between the servers.  I can still easily do this through the filesharing options available on the Mac, and I think I actually kinda prefer the more obvious sharing that is done that way.

Overall coRD is a great product, and I would recommend it for Mac users who have windows servers they need to work with.

Forcing the Choice of A Mail Account

Thursday, December 6th, 2007

I recently posted asking the question of how to force the choice of which account to send e-mail from using Mail.app (Forcing the Choice of A Mail Account). As silence responded to this cry for help, I ended up trying to produce a workaround (credits to AJ for not letting me whinge about this to much and for suggesting I head in this direction). Here is what I ended up with.

Step 1: create a new account in the settings with the name “CHOOSE AN ACCOUNT”. Set the server to localhost, with a simple username and password, which are required. Do this through the preferences screen (CMD-,)

Mail.App Accounts

Step 2: change the composing options to always send mail from the account just created.

Mail.app Composing Preferences

The combination of these two settings will ensure that you are always forced to choose an account when sending a new e-mail message. This already has been a useful opion, stopping me from accidently using the wrong account (which I must admit I did a couple of times beforehand). When you forget you will see the below popup. The important thing to do with this is to choose the “Edit Message” option, and go and choose an account.

Mail.App Cannot Send Dialog

This will produce a working solution, and I've been happy with it, having successfully avoided sending an e-mail from the wrong one of my 4 actively used e-mail accounts.

Manually Removing Items From the OSX Finder Sidebar

Saturday, June 23rd, 2007

The OSX Finder Sidebar is pretty cool.  It lets you have a list of favorite folders that you can easily navigate to.  From time to time one wants to update the list to reflect the current things being worked on.  In a recent cleanup of my sidebar, I had more pain that I wanted to face, but was able to sort out where the preferences are maintained, and wanted to make it easy to work out in the future.

It's actually pretty straightforward…

~/Libary/Preferences is where user preferences are kept. So open up a terminal and type cd ~/Libary/Preferences to get to the preferences directory

Then type  find . -name  *sidebar* in directory, to search for sidebar preferences.  You should see the plist: com.apple.sidebarlists.plist.

Finally type open com.apple.sidebarlists.plist to open up the property list editor, which makes it is easy to then navigate through the tree and remove items.  Finder only loads the properties when it is first started, so you will need to reboot to see the changes take effect.

 

Visio for OS X - OmniGraffle

Thursday, July 20th, 2006

Abstract

OmniGraffle is a great tool for OSX. You know you want it. If you don’t know, try it out and then you will. If you don’t have a Mac, then buy one, and use OmniGraffle.

Introduction

When architecting a solution for a client, diagrams provide a good way of communication. A picture or diagram(often worth a thousand words), can help communicate concepts and ideas well. In Windows land, the tool of choice for doing these diagrams is Visio. Visio has templates and tools for doing all the standard IT diagrams that an architect needs. Visio is owned by Microsoft, and is a Windows only solution.

What about OS X?

Windows only is bad. I have drunk the koolaid, and do almost all my work on my shiny OSX laptop. Unlike Cedric I am a very happy switcher, and am working out how to get things working the way I want them to.

So when picking up the need to do diagramming, I took a dig around at the options on Mac, and ended up with OmniGraffle. It works great. I’d describe it as a Macified Visio. It has really done a good job of working mac like and has a very good interface. A nice touch is that OmniGraffle supports Visio VXD documents.

Nice features

It really is a nice tool to use. A bunch of the bits that I like are listed below (in no particular order).

The pro version provides canvasing, and layering support. My mental picture is that a canvas is like a printed page. Layers are bits that you can reuse nicely across pages.

I have setup a layer that is the master background. For doing processes it has swim lines set up.

Then the canvases can be used to work on top of the layer. The nice part of this is that the background layer doesn’t get picked up by default when selecting items. I can leave the background there and move around the processes easily.

One can easily select items of the same type using the inspect tool.

There is nice support for grouping items.

When dragging and dropping items around, there are snap points, and guides appearing to help line things up into the right spot, making it easy to give nice vertically and horizontally aligned items.

Magnets on shapes (spots where lines connect to) are able to be changed quickly to any number of different options—and the selection of these is quick and easy.

Templates for all the standard diagrams exist. For the so-inclined there are the standard IT/IS/business process elements, world maps, lego style building blocks, and even CISCO network elements.

Conclusion

In case you didn’t realise, OmniGraffle is good. Go and buy it already.

Howto do Base64 Decoding on OSX

Thursday, October 27th, 2005

Update: cleaned up to ensure stuff wasn't being treated as tags.

On odd occasions there is a need to do Base64 decoding to view a file.

One example is to view an attachment that is available on a mailing list archive. Say for example, something like this from a Crypto group.

This can be pretty easy to do if you know the right magic on a real operating system (unix backed).

1) copy and paste the output into a file 2) openssl base64 -d <inputfile >out.pdf 3) grin merrily… there is no step 3 (like Instiki).

(For those interested — the OS X post is cause I switched :)… I have a G4 iBook and I am loving it :)).