My twitter feed


Follow deasmi on Twitter

Create address book groups of cards with pictures

There is no way in the Mac OS X Address book in Lion ( or earlier ) to search for cards with pictures.

This means you can’t make a smart group or a normal group of your picture contacts.

The following applescript will create one for you.

tell application "Address Book"

    set picGroup to group "Contacts with Pictures"
on error
    set picGroup to make new group with properties {name:"Contacts with Pictures"}
end try

repeat with ThisOne in people
    if (count of image of ThisOne) > 0 then
        add ThisOne to picGroup
    end if
end repeat


end tell

Split Tunnel DNS or per domain DNS

If you use a VPN connection that allows split tunneling you may also want to split your DNS resolution as typically you’ll continue to use your locally supplied DNS.

For example suppose I’m away from my office and I’ve been given the ip address,, by the local network I’m using and that the local DHCP server has told be that is the DNS server. The local network domain is companyb.internal and the DNS server will resolve things in this domain for you.

If I connect back to the office VPN using a split tunnel I still want to be able to use their DNS for internal items but I also want to be able to use my company VPN to access our DNS servers.

Happily Mac OS X supports multiple resolvers as outlined in the manage (man -s 5 resolver ) or here

So assuming that the DNS server on my company LAN is and that my company domain is companya.internal I can simply create the file

/etc/resolver/companya which contains

domain companya.internal

From that point onwards I’ll have DNS working even with a split tunnel. This method can also be used if you ware in any other situation where you want some domains to be resolved differently to others. /etc/resolver files take precedent over the system default resolver.

64bit Global SAN iSCSI initiator now available

After nearly (actually?) a year Global SAN have released 4.1 beta of their free iSCSI initiator for Mac OS X.

Critically this brings 64bit support, allowing the use of the 64bit Snow Leopard kernel and iSCSI at the same time.

It can be downloaded from here

Forums are here.

I’ll post an update if I have any issues.

UPDATE: Note that this initiator is now a paid product, they no longer have a free version. The out of date free version does not work reliably with Mountain Lion in my experience.

Scripts to help backup using duplicity

I’ve released some scripts I’ve written to help manage backups of servers to Amazon S3 using the duplicity software.

All the code and instructions can be found here.

Google Apps Extension

I’ve written a quick extension for Safari 5 to give you a button bar with links to one or more google apps domains as well as the standard google services.

See here for details

Aperture vaults on iSCSI

I’ve noticed that I’m seeing a few hits recently from google for people searching for ‘aperture iscsi vault’ because I mentioned that I have one of these in a post about backups.

So I thought I’d write this quick post to explain what I’ve done and how I’ve got on with doing this.

The first thing to say is that this isn’t my primary Vault, I use an external Firewall drive for that, which is also my Time Machine backup drive. I also have a couple of external USB drives that serve as vaults and backup drives that I rotate to a family member with a firesafe, so worst come to worst I’ll only ever loose a couple of weeks data.

The iSCSI vault started as an exercise in ‘is it possible’. In theory an iSCSI device appears to Mac OS X as any other locally connected device and as I have an Openfiler based NAS in my cellar which support iSCSI I though I’d give it a go.

It was a pretty simple process to get setup, well simple if you have an Openfiler NAS, know what iSCSI is and how it works I suppose.

Firstly I setup the LUN on the Openfiler NAS which I’m not going to cover in any details, post a comment if you are really interested, of about 150GB.

Next I downloaded and installed the Global San Initiation from Studio Network Solutions and pointed it at the LUN. This initiator appears to work fine with Snow Leopard but does have a 32bit preference pane.

Pointing the initiatior the LUN you get a message from your Mac telling you an uninitialised disk had been detected and would you like to format it. I suspect pressing yes will work fine but I said no, ran disk utility and created an HFS+ partition manually.

Once that has finished you’ll have a new drive on your desktop that looks and acts just like any other directly connected drive. It can have spotlight run against it, or not, and also crucially will show up as a valid location for a vault in Aperture.

Finally go ahead create the vault and wait whilst it fills up.

I’ve been running this for over a year now without a single issue, even restored my whole library from it once as a test. I can’t recommend this as your only vault as strictly it’s not supported but as a secondary it’s great.

There are also no apparent issues with Snow Leopard.

Finally don’t even think about doing this unless you have a gigabit ethernet connection to your NAS and Mac, it’ll take forever.

If anyone wants anymore information please feel free to email me or leave a comment.

[ Update: ] One thing I have noticed is that there is no 64-bit iSCSI support yet, Global SAN have it in the works but it’s not ready yet. Because of this you cannot use iSCSI and 64-bit kernel mode at the same time.

Where has my disk space gone ?

Recently my Time Machine drive had filled up, not in itself that strange except it had gone from 400GB free to full in a month or so and I didn’t remmeber downloading anything that large.

I had drawn a blank as to why until I stumbled upon on a special build of GrandPerspective called TimeMachinePerspective that shows what you Time Machine backups are made of. One slight issue is the lack of source code as GrandPerspective is GPL so TimeMachinePerspective should provide it too, I’ve emailed the author to try and get hold of it.

Update: The author has provided the code and once I manage to merge it into the source for GrandPerspective I’ll post it here.

There was the culprit, I had installed CrossOver Games a month or so back so I could play Team Fortress 2 ( great time sink if you haven’t tried it ), so that explained some of it. However Steam had run a few patches on the files since then and each time the file ( all >1GB ) was patched the whole file had been backed up again !

Problem solved by excluding ~/Library/Application Support/Crossover Games from Time Machine backups and deleting all the old ones.

iPhone Application Launch

Today my first iPhone application has been accepted for the iTunes App Store, I’m quite excited, and should be in the store tomorrow when this link should work to take you there.

It’s a whois application that has a little database to keep track of what is available and what isn’t as well as supporting over 100 TLDs

More information and support information can be found here.


Removing cached 802.1x credentials on Mac OS X

I have been doing a lot of work over the last two years with the Guardian as technical architect for their move to a new building. This included the installation of a new LAN within the building that supports 802.1x authentication which was used on both wired and wireless networks.

During testing, not surprisingly, a number of test usernames and passwords were setup and one of these got stuck in my mac. Whatever I did after a reboot, a sleep or virtually any other event the test username and password would return to both the wired and wireless preferences pages.

I’d ensured that I’d removed all entries from the keychain and yet there they were again and again and again.

Today I finally found the files that explained this.

/System/Library/Preferences/ ~/Library/Preferences/

These plist files had the test usernames in and a UID reference to the password in the keychain. This explained why I could never find the keychain entries ! Delete these files and I think you’ll be free of any cached information about WPA or 802.1x wired authentications.

Finally I don’t spend 20 minutes trying to connect to the network.

Lessons Learnt – Again

Backups, we all know we should do them and we all forget some every now and again.

Now for my really important stuff I rely on Time Machine, hasn’t let me down ( touch wood ) and is nice and hassle free. On top of that for my photographs Aperture vaults including one to an iSCSI target on an Openfiler based NAS give me peace of mind.

This NAS is also the primary storage for my VMWare ESX cluster. This cluster runs, among other things, a Linux firewall, infrastructure hosts ( DHCP, DNS, LDAP etc. ) and the ESX Virtual Centre management server.

Without the NAS therefore everything goes dark, including my internet connection which goes through a virtual machine firewall.

The other day everything went dark…..

Now these things happen, the boot disk in the NAS was very old and had died, leaving all the other components running on ESX effectively without their system disks.

In a testament to Linux quite a lot of stuff carried on working on the infrastructure hosts, DHCP, named etc. for some time even though the hosts had lost local disk. However eventually they too died and only then did the situation present itself to the wider world.

This didn’t seem like a big deal as I keep a copy of these critical virtual machines on the local disk of the ESX servers themselves so I could start one up. At this point however ESX virtual centre had been down for some time, so long in fact that the ESX hosts had lost their licenses. Hmm, chicken, egg.

Now I know that in theory running virtual centre and the license server on the ESX infrastructure is supported, I’m just not quite sure how you are supposed to boot strap things and without internet access couldn’t find out.

This led to a very boring process where I rebuilt the NAS system disk, using the installer disk I thankfully left near to it, got it up to a state where I could copy things off it. I then had to copy a 9GB VM over to my Mac and run VC in VMWare fusion, which thankfully worked first time.

This allowed me to start the local disks versions of the infrastructure hosts and start the long job of rebuilding the NAS config, which wasn’t backed up, to resurrect the rest of ESX.

So what does this sorry tail tell us ? One backup all your configs, two plan for the worst and three check you plans. Ok that last one doesn’t flow from this story but it’s good advice anyway !

piratebay,pirate bay,pirate,bay,torrents,free,free software,software,torrents,free torrents,free porn,porn torrents,torrent