Address Book groups

Some time ago I found a rather useful way to use my Address Book contacts – group them and when you type the name of the group in Mail.app address field, it is expanded to all the contacts. But the problem was that when a contact had multiple addersses, I could not determine which was to be used for the group automatically and if I wanted to write to a specific address I had to manually adjust, which I forgot rather often.

Edit Distribution List

Fortunately Address Book has a way to specify the default address for any group (or distribution list as it is called). Just right-click on one of the groups, as shown below and pick “Edit Distribution List…

Pick Edit Distribution List from options

Pick Edit Distribution List from options

Now a window pops up that shows you the entire list and all of the multiple addresses for each card. Just skim through the list and highlight in bold the default addresses which should be used automatically for this list:

Address Book Distribution List

Clik OK to save changes and your done.

iTunes, iPhoto and Migration Assistant

I migrated my MacBook to a new MacBook Pro 2010 release using Migration Assistant and just as many others, found that my iPhoto did not show any photos (only thumbnails) as well as iTunes did not show any music. The Finder did show the files though.

Don’t panic!

And don’t blame Migration Assistant for it. What has happened is that you are probably running older versions of iTunes and iPhoto (and probably OS X too for that matter) than you were at the other Mac. So, just run Software Upgrade (with restarts and everything) until it tells you that you are up to date. Then all should be well with iTunes and iPhoto too.

Credit: this tip was kindly pointed out by AndyField. Thanks!

Overfilled ZFS won’t delete files

Today I ran into a trouble when I had filled my ZFS filesystem and tried to free up some space:

$ rm boxroom-0.6.3.zip
rm: boxroom-0.6.3.zip: Disc quota exceeded

The same error was given for all kinds of rm options, recursive, force, etc.

Digging around, pointed me to this post and that B solution was excellent:

$ ls -larth boxroom-0.6.3.zip
-rw-r--r--  1 laas  wheel   344K Apr 19  2009 boxroom-0.6.3.zip
 
$ cat /dev/null > boxroom-0.6.3.zip
$ rm boxroom-0.6.3.zip

Though this only freed up 344 kilobytes, it was enough that I could remove the file itself and then move on to more bigger files to free up the needed space.

Note: It was pointed out to me that the ZFS filesystem was compressed, which would shed light on the whys of the problem, as modifying compressed structures might increase the size, whereas truncating is the only option to decrease it.

xdebug with XAMPP on Mac OS X

Xdebug logoI just upgraded my XAMPP to latest release and found myself trapped with no memory of how to install xdebug on a Mac with XAMPP.

Read more »

Git reset –merge

Or how to reset a merge commit?

If just after a merge commit you recognized that it was actually “git rebase” that you wanted to do, then your friend is:

git reset –merge 14c1d90c3e

where the target commit is the one preceding the merge.

But when reset is not an option?

But if you found the faulty merge after several other commits (or after pushing to remotes), resetting is not so good idea or won’t work at all. In that case refer to How to Revert Faulty Merge in the HowTo.

Vim unindenting comments

I was annoyed that Vim moved all comments to the beginning of the line the moment I entered # sign. Searching around first turned me to smartindent, but I found that was already off.

Then this vimtip shed the light on the monster:
http://vim.wikia.com/wiki/Restoring_indent_after_typing_hash

just add to your .vimrc:

set cinkeys-=0#

And you are good to go.

Ruby lambda

I stumbled upon a problem with one of my scripts: how do you split a yielded block between two different callers while conforming to the DRY principe? The answer is lambda method.

Read more »

MacFUSION workaround

Upgrading to OS X 10.6.3 broke the excellent MacFusion mounting app. For those like me, who depend upon SSHFS mount, there is a workaround using static sshfs mounting.

Read more »

Chrome ad blocking

I noticed that all of a sudden my Google Chrome (Mac OS X version) has a ~ 10s delay between displaying a web page and making the links clickable.

At first I suspected my password manager extension that it scans through the page for possible forms to fill, or some other extension. So I went through a Search and Destroy sequence with all of my extensions but for avail, until I disabled the AdBlock extension.
Suddenly all is fast again. Alas, now the ads slow it down. Read more »

iMovie and MTS

A few times before I have imported my short clips from the Sony HDR-CX106 camcoder directly using iMovie camera import features. Now, that I had a bit longer videos on the camera, I got to thinking why it takes so long and how come it reports that 60 GB of my hard drive will fit only 1 hour or so full-quality video. It turns out that by importing, iMovie probably converts all the clips into HDV compliant format, thus MPEG2 and thus resulting in wasting my hard drive space.

Read more »