Jon AtkinsonI'm a web developer and system administrator

Posts tagged with 'mac'

FileMerge keyboard shortcuts

Posted on 18th September 2008. Tagged as tips, osx, mac, filemerge

I really like Apple's FileMerge. I like it because it is simple, and I like it because the interface is apparently unchanged since NeXTSTEP. It feels like using a well-worn hand tool of some kind.

I don't like the fact that it requires use of the mouse for all but the most simple of tasks (the only merge-window shortcuts are the left and right cursor keys, for 'merge left' and 'merge right'), and there the help pages don't list any of the keyboard shortcuts. When you have a thousand line file to merge, and some of the changes require 'choose both' or 'choose neither', using the mouse becomes rather tiresome rather quickly.

Fortunately, you can edit FileMerge's interface definition file quite easily to add some extra keyboard shortcuts, or modify the existing ones. Provided below is my .nib file for FileMerge, which defines the following shortcuts:

  • Left - Choose left
  • Right - Choose right
  • Ctrl-Left - Choose both, left first
  • Ctrl-Right - Choose both, right first
  • Space - Choose Neither

You can download my interface definition, unzip, then drop the diffview.nib file into

/Developer/Applications/Utilities/FileMerge/Contents/Resources/English.lproj/

Restart FileMerge and you'll have working keyboard shortcuts. Much faster!

Installing M2Crypto on OSX

Posted on 9th October 2008. Tagged as python, tips, osx, mac, m2crypto, openssl

I really like M2Crypto, but it is difficult to install on OSX without a few annoying prerequisites. Assuming you are running Leopard (or, I guess, newer), this is what you need to do:

First, you need to install the XCode Developer Tools. You probably have these installed already, but if not, they're on your OS install discs, or you can download them from Apple. Once they're installed, you should have a working C compiler. Test with:

$ gcc
i686-apple-darwin9-gcc-4.0.1: no input files

Now, you need to install the OpenSSL headers. Grab the latest OpenSSL package from here. Now, unpack and build it. You might want to put the kettle on, this takes a little while.

$ tar xzf openssl-x.x.x.tar.gz
$ cd openssl-x-x-x
$ ./config --prefix=/usr/local
$ make && make test
$ sudo make install

Next, download SWIG. Again, this needs unpacking and building:

$ tar xzf swig-x.x.x.tar.gz
$ cd swig-x.x.x
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

Finally, you need to download and install M2Crypto. Grab the source, and install it as follows:

$ tar xzf M2Crypto-x.x
$ cd M2Crypto-x.x
$ python setup.py build build_ext --openssl=/usr/local
$ sudo python setup.py install build_ext --openssl=/usr/local

Then to test your installation, simply do the following:

$ python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import M2Crypto
>>>

Twitter

There was a problem retrieving Jon's recent Tweets from Twitter. If you're really interested, you can visit twitter.com/jon_atkinson/

About Me

Picture of Jon Atkinson

Jon Atkinson is a web developer, sysadmin and occasional business guy. He works in the north west of England.

Jon can be contacted at , or on freenode as JonA. Also available: twitter, LinkedIn and Github.

My Company

I'm a director of FARM Digital, a company which provides bespoke web and mobile development for all kinds of businesses.

If you're interested in working with me, take a look, then contact me via FARM.