tisdag 23 november 2010

What he said

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/

lördag 20 november 2010

iPhone keyboard too small? Use the one on your computer instead ...

There are applications on the iPhone that wants you to write longer things. An excellent example is the Momento App which is a very nice way to keep a diary, complete with all of your web presence. Though, of course, if you'd like to write a longer piece about your day, you quickly find that the small keyboard on the iPhone is very much a limitation. You simply do not write as much, and as quickly, on the small keyboard.

Of course, you could prepare a message and then send it to yourself through email. Too complicatd for me though, so I never to it. Also, you could buy a bluetooth keyboard, but if you really don't need it for something else.. this is a bit much just for keeping your diary. Also, a keyboard is still another thing to bring with you, and as you may have a computer and iPhone with you already, this is already becoming too much.

Enter myPhoneDesktop. Simple desktop (Mac, Windows or Linux) or even web client which connects to software on your iPhone. Through this connection, you can easilly transfer text, links and images or place a call through the phone or skype on the phone to a number that you send to the phone. Or, from your phone to your desktop.

Neat stuff. No need to carry an external keyboard around if you already have a computer with bluetooth! :-)

tisdag 9 november 2010

Time to clean up your iPhoto library.

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.

måndag 8 november 2010

More on getting PGP/ GPG keys into your keyring

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

Then, extract only the unique email addresses:

cat ad_all.txt |sort |uniq > ad_uniq.txt

The, get GPG to fetch all the keys:

for a in `cat ad_uniq.txt`;do gpg --search-keys $a;done

This will take a while, but at the end of the run, you will have an updated GPG keyring with all of your email contacts keyrings in them.
Happy GPG-ing.