I just posted to Rubyforge the first public version of FinderColor, a very small interface to the Finder label colors in Mac OS X. FinderColor sends Apple Events using rb-appscript, bypassing AppleScript entirely. This counts as a good thing.
sudo gem install findercolor
There are only 5 methods to FinderColor:
The index argument must be between 0 and 7. The hash argument to batch_set expects the keys to be integers or symbols for color names.
FinderColor::Labels gives you an array of the color symbols in their index order:
FinderColor::Labels #=> [:none, :orange, :red, :yellow, :blue, :purple, :green, :gray ]
Posted by Young Heaving Bosoms of Liberty on July 30, 2007
Today was the second time I had to research the same problem with OpenLDAP and ActiveLdap. I have no idea what happened to the solution that I found and employed, but it’s gone. Can’t find it. No love from grep.
The problem is this error in ActiveLdap
undefined method `' for nil:NilClass - (NoMethodError)
The solution is to add two ACL lines to my slapd.conf or one of its includes:
access to dn.base="" by * read
access to dn.base="cn=Subschema" by * read
The reason why come is that ActiveLdap apparently queries anonymously for the schema, and my acls are too mean and stingy. If you start your development with strict ACLs, you hit the problem early. If you wait until near deployment-time to tighten up the security, you will be surprised when stuff just stops working.
You can see whether your ACLs are preventing access to the schema by running the following ldapsearch command:
ldapsearch -xh http://www.example.com -b '' -s base subschemaSubentry
If the result doesn’t look something like the example below, then you can try adding the two ACL lines above. The important section is the second, where you see that the value of subschemaSubentry is ‘cn=Subschema’
# extended LDIF
# base with scope base
# filter: (objectclass=*)
# requesting: subschemaSubentry
# search result
result: 0 Success
# numResponses: 2
# numEntries: 1
Posted by Young Heaving Bosoms of Liberty on July 4, 2007