Monday, February 11, 2013

Outlook 2011 Mac Smart Folders

New job, new tools.

Outlook on a Mac. Hmmmm. Been years since I used Outlook on a daily basis under Windows. (c. 2005)

Like anyone, I get way too much email. Waaay too much.

I've tried all sorts of enhanced tools over the years, but none of them ever made me say "wow!" for more than a few weeks.

At the end, my basic requirement to try and keep on top of stuff is to have a logical view of my inbox that unites both my unread (incoming) and flagged (gotta do something about). Everything else is chaff at that point. So I've ended up with this folder called Active which is Unread OR Flagged.

With Apple Mail, I've been able to create a set of smart folders (stored queries) that achieve the result. Clumsy, but it works OK.

With Outlook, I found myself unable to do any kind of OR through the GUI. Then I noticed the Raw Query feature.

Raw query lets me create a smart folder that can OR terms together. The problem is finding documentation. Best blog posts so far: Smart Folder with Raw Query and

For my specific purpose, here's the query that works:

com_microsoft_outlook_unread != 0 || com_microsoft_outlook_flagged==1

The less-than-obvious point worth noting is that in addition to these microsoft namespaced properties, you have all the spotlight defined metadata properties: e.g. kMDItemAuthors

kMDItemAuthors == *Richard* 

matches anything with Richard anywhere in the authors display name.

One gotcha: this search doesn't behave well if you have the "mark as read after 2 seconds" preference turned on. If you do, you click on a new unread item in the Active smart folder only to have it suddenly disappear 2 seconds later.

Monday, January 07, 2013

sudo fails Mac OS X Mountain Lion

Well, well, well. Yet another "you've got to be kidding?" experience with Mac OS X

I recently received a new laptop for work - a shiny new MacBook Air. Lots of things to like about this machine.

However, after setting up my new account, etc. etc. I noticed that certain apps wouldn't install. Citrix Receiver, for example. (Don't ask...)

Consulting the Console, I observed messages ala the following:

root : can't open /private/etc/sudoers : Permission denied ; TTY=unknown ; PWD=/private/tmp/PKInstallSandbox.J6J7fY/Scripts/com.citrix.ShareFile.installer.zTdyaJ ; COMMAND=chown

Hmmm. Really?

A quick check in terminal revealed:

$ sudo
sudo: can't open /private/etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting


Luckily, I'd set up a root user account (via the OpenDirectory management app  ... see instructions here which meant that I wasn't trapped in hell.

Rather, I could simply do this

$ su - 

Whew. I'm still god.

A quick look around confirmed that, yes, indeed, /private/etc/sudoers existed. Hmmm

After much digging, a reference to the middle of this support thread saved me further wasted time:

Here's the skinny, thanks to Adam Wenocur

I had this exact problem.  It was due to the group execute bit being set to 0 on the root directory (not /private, not /private/etc).  Be sure that both the owner and group execute bits of the directories containing /private/etc are all set to true, otherwise sudo won't be able to open the sudoers file.

The key is this - for whatever reason, the permissions of the *root directory* of my drive were bogus. Note that I'd *already* done the Disk Utility Repair Permissions dance. It found a few gnats and fixed them, but not this.

The fix was simple, once you are logged in as root:

root# chmod g+x /

And voila: I can use sudo again.

Sunday, May 20, 2012

Really, really annoying Apple Double rubbish

OK, so I'm not the first person to rant about this but took me more than 20 seconds to solve so I'm reposting.

Basic problem when trying to create a simple tarball on Mac OS X for use on Linux - the Mac tools shove resource forks into the tarball using the "dot underscore" AppleDouble ._ file naming convention.

I happen to use TextMate on occasion and it seems to shove stuff into the resource fork of simple text files. Damn.

Solution was to


in my ~/.bash_profile to prevent standard cmd line tools from encoding the resource fork in this fashion.

I'm trying to think of a case when I would want the AppleDouble rubbish when creating tarballs ... and I can't. So there.

Wednesday, May 18, 2011

Custom metadata tags in Flex 4.5

After upgrading to Flex 4.5 recently, I have become annoyed with Flash Builder's new obsession with marking metadata tags as unknown.

Unknown to you, FB, maybe, but not to me or my friends....we make heavy use of custom metadata tags, especially since adopting the parsley framework almost two years ago.

So I was kinda happy to find this after some digging:

Turns out, hidden down in the flex 4.5 sdk frameworks dir is a little file called metadata.xml that provides metadata about the metadata tags. The FB tooling uses this file to configure the new auto-prompters for metadata.

Cribbing the syntax from the SDK file, I crafted a metadata.xml for parsley 2.4 which has helped to shut FB up. It just needs to be included as an asset copied into the SWC.


Monday, May 09, 2011

Samsung 2343BWX and MacBook Pro

I recently upgraded to a Samsung 2343BWX monito
r for work. Lovely 23" screen at a great price. Natur
ally, I wanted to exploit the full 2048 x 1152 native resolution with my (older) MacBook Pro.

Problem: the Mac wouldn't recognize the max res of the monitor. I was stuck in 1920 x 1080 !

No obvious answers anywhere on the 'net.

Long story short, the solution is software: grab a copy of SwitchRes X 4.x and then create a custom config as follows:

Saves changes, reboot and select the new resolution via the System Display preferences.


UPDATE: Recently, my MacBook Pro simply refused to offer the 2048x1152 setting and SwitchResX reported it as "Invalid". After much mucking about, I finally stumbled over the "Overscan" option in the main Display prefs. It was turned off. Turned it on, and life is good again.

Monday, February 22, 2010

DevOps - about time!

The DevOps movement seems like a no-brainer to me: treat the management of operational systems as we treat the management of software development.

Version control everything, seek to automate every single process that changes anything and automatically test every change. And then, make the smallest number of changes necessary to deliver the benefit sought. Take as many human, error-prone activities *out* of the overall process as possible - or as I've been overheard to say on a particularly bad afternoon "eliminate the monkeys".

Not surprisingly, devops and agile are strongly related - indeed, some have described devops as extending agile the "last mile" beyond development and into operations. About time!

in reference to: (view on Google Sidewiki)

Sunday, August 09, 2009

xobj hosted on bitbucket

This post should have be written a few months ago. xobj has been made available as open source on bitbucket

The xobj project provides an object reflector between various dynamic languages and XML. Currently, python and ActionScript 3 implementations are available.


xobj was motivated by a few specific goals:

  • Make the use of XML for object model interchange between client and server tiers less painful
  • Allow your code to use real typed instances of classes rather than simple generic data structures
  • Treat your code as the definition of schema rather than forcing an XMLSchema driven approach on your code.
  • Read and write XML documents that will pass most XMLSchema structural validation requirements with relatively little effort on your part
It is not required to provide an XML schema to use xobj. Custom objects may be used for parts or all of the document, whether or not an XML schema is provided. Schema validation is optional. If new elements show up, they will be preserved across read/write; schema additions will not normally require code changes.

Implementation Notes

During XML decoding, xobj preserves namespaces, element ordering and tracks attributes vs elements so that re-encoded object graphs can comply with most of the common XMLSchema validation requirements. This observed metadata is attached to your object graph rather than hidden out of view.

For "whole cloth" generation of XML from object graphs that were not themselves decoded in the first place, you can provide the namespace, elements ordering and attribute metadata declaratively to facilitate XMLSchema conformance.

However, most casual-use applications don't need to worry about namespaces, so your instance graphs will encode just fine as a usable XML document leveraging as much runtime class introspective data as is available. (AS3 in particular)

During decoding, xobj uses both the runtime type information available from your classes as well as a typemap you specify to determine the target type for every decoded XML element.

During encoding, xobj uses this same runtime information plus additional observed (or provided) metadata to inform the output XML.

For ActionScript, xobj decodes XML documents directly into typed instance objects rather than generic Object or ObjectProxy wrappers. This avoids the double-handling of generic objects required by the default SimpleXMLDecoder provided by Adobe Flex.

We've made a lot of use of this library in recent Flex/Python RESTful services at rPath.