Could not agree more:
http://www.terminally-incoherent.com/blog/2008/07/29/ms-office-addiction/
http://www.terminally-incoherent.com/blog/2008/08/13/no-one-uses-gpg-with-outlook/
Could not agree more:
http://www.terminally-incoherent.com/blog/2008/07/29/ms-office-addiction/
http://www.terminally-incoherent.com/blog/2008/08/13/no-one-uses-gpg-with-outlook/
Like I've written before, iPhoto is a database application developed around the SQLite database engine. Sometimes database engines allocate more and larger pages than needed, and this extra space is most often kept allocated even when you delete data from the database.
So, it might be worth-while to clean up some of this allocated-but-unused once in a while, to make iPhoto run a bit smoother. In database terminology, you need to VACUUM your database, and this is what I will show you how to do below.
First, we open up the terminal and move into the iPhoto library. Please make sure that iPhoto is not running while you do this, just in case.
$ cd Pictures/iPhoto\ Library/
Inside this folder, there are a bunch of .db files:
$ ls -al *.db
-rw-r--r-- 1 zak staff 6173696 Nov 9 07:34 face.db
-rw-r--rw- 1 zak staff 14992384 Nov 9 07:28 face_blob.db
-rw-r--rw- 1 zak staff 24619008 Nov 9 07:57 iPhotoAux.db
-rw-r--rw- 1 zak staff 7424000 Nov 9 08:00 iPhotoMain.db
We can use a bash for loop to loop over the database files and vacuum them all:
$ for dbase in *.db; do sqlite3 $dbase "vacuum;"; done
Now, when we examine the size of the files again, we see that they are smaller. Please note that no information is lost here, we are just cleaning out empty space.
$ ls -al *.db
-rw-r--r-- 1 zak staff 4704256 Nov 9 15:23 face.db
-rw-r--rw- 1 zak staff 14746624 Nov 9 15:24 face_blob.db
-rw-r--rw- 1 zak staff 18824192 Nov 9 15:24 iPhotoAux.db
-rw-r--rw- 1 zak staff 5400576 Nov 9 15:24 iPhotoMain.db
In my case, I was able to get rid of a couple of MBs of unused, but allocated, space, and hopefully have a more pleasant experience using iPhoto.
One issue with PGP is getting the keys into your keyring. In a previous post, I described how to get the keys of all the people in your Address book into your ring. Of course, you don't want to keep all the people you sent an email to in your Address book, which means that not all of your potential PGP uses will be realised. What you need is the extract all the email addresses you ever saw, and then get the key for them. This is what we will do now.
First, get all the email addresses from your mailboxes using Perl (in the terminal):
cd ~/Library/Mail
for a in `find . -name "*.emlx"`;do perl -wne'while(/[\w\.]+@[\w\.]+\w+/g){print "$&\n"}' "$a";done > ~/Desktop/ad_all.txt
cat ad_all.txt |sort |uniq > ad_uniq.txt
for a in `cat ad_uniq.txt`;do gpg --search-keys $a;done