Friday, October 29, 2010

Howto: restore command-H to hide selection edges in Photoshop CS5

When you first use Adobe Photoshop CS5, you get asked what you want to do about the command-H (⌘ H) key combination.



If you selected 'hide photoshop' but you regret it and want to use the traditional Hide Selection instead, you need to change your keyboard shortcuts.

In Photoshop select edit > keyboard shortcuts


and then scroll down till you find "Hide Photoshop".

Click onto the shortcut, and then click 'delete shortcut'.

Next scroll further down to View > Show and in there you find 'Selection Edges'.



Click in and type "cmd H" and you'll see ⌘-H. Click OK and you're done.

Tuesday, October 26, 2010

Google Voice and Android / SIP / VOIP calls

If you've read my howto on getting Sipgate on Android using Sipdroid going now we can move to the next stage which is to make calls via the Google Voice web page.

Things you need:

- Google Voice account

- Sipgate.com account

- Sipdroid configured and working on your Android

Together this will allow you to make Google Voice calls (US only) through your Android using SIP / VOIP ie free.

First you need to go into your Google Voice settings



and then click

The window opens.

put in your Sipgate credentials, and call this phone something like oh I don't know, Sipgate

Click Save.

You'll get the verification dialog up


Take the call, put in the code, and you should be good to go

Just tick the account so phone calls go there

Sunday, October 24, 2010

sipgate unknown error 171100

While getting my Sipgate account working with Sipdroid on my Android I was getting the error "unknown error 171100".

There isn't much information on what it really means. Eventually I gave myself a break and did something else. Came back to it an hour or so later, and all was well.

So I figure its something to do with DoD protection or too many password attempts.

Wednesday, October 20, 2010

Making parity files, redux

In working out my first method of creating a parity file set, I was looking through the options you get running RAR in command line. And I saw the "-rv switch".

This does the whole of the first method for you in one go!

The same idea applies that you split your file into 2 chunks of equal size. From the manual:

"Each recovery volume is able to reconstruct one missing RAR volume. For example, if you have 30 volumes and 3 recovery volumes, you are able to reconstruct any 3 missing volumes. If the number of .rev files is less than a number of missing volumes, reconstructing is impossible".

So the command looks like

    $ /applications/rar/rar a -rv -v26250k photos.rar Photos.dmg.rar

As before we get our chunks, but now the -rv switch creates an extra, .rev, recovery file


When I need to unrar the file, and one of the parts is missing, the .rev is used

    $ /applications/rar/unrar e photos.part2.rar

    UNRAR 3.93 freeware Copyright (c) 1993-2010 Alexander Roshal

    Extracting from photos.part2.rar

    Calculating control sums of all volumes.
    1 recovery volumes found
    Cannot find volume photos.part1.rar
    1 volumes missing
    Reconstructing... 100%

    Extracting from photos.part1.rar

    Extracting Photos.dmg.rar 50%

    Extracting from photos.part2.rar

    ... Photos.dmg.rar OK
    All OK

and I'll get my file back.

If you want to increase your reslience further, you can create more than 1 .rev file.

    $ /applications/rar/rar a -rv2 -v18000k photos.rar Photos.dmg.rar

So this command will create 2 .rev files which means that of the three files created, I can lose any 2 and still get my data back.

Monday, October 18, 2010

Creating parity files to protect against data loss

You'll have heard about RAID 5, where a file is written to disk 3 ways so in the event of the loss of a disk you can get your file back. And of course there's its more resilient cousin RAID 6 where the data goes 4 ways and you can sustain the loss of 2 disks.

I was wondering how to do this on demand so I could take advantage of 'cloud' storage. Microsoft offer 25Gb free. And to tie this is with backing up only with RAW photo files. I can already identify and gather them together and encrypt them.

One way is to use the Parchive (parity archive volume set) idea developed to transmit files over Usenet. You need to start with a file that is already split into smaller chunks, and RAR is the best. This howto is focussed on OSX, I guess other OSs would be similar.

Step 1 is to RAR the sparseimage file I created earlier:

$ /applications/rar/rar a photos.rar Photos_1-99.sparseimage

The reason for this is that I want to split the file into 2 near-equal sized pieces, and doing a compress and split in the same step means its hard to work out the size of the chunks.

Step 2 is it split this file into 2 pieces. I know that RAR'd it is 53.5Mb, so half will be about 26.75Mb. After some trial and error I find a good value -v26250 to be a good value. Of course what is actually happening is that this sets the size of the first chunk and the second will be the remainder. If I get 3 files I've used a value thats too small.

$ /applications/rar/rar a -v26250k photos.rar Photos.dmg.rar

and this creates 2 files.



Next get MacPAR deLuxe. Open the app and it will open a new PAR 2 window. Drag in your two files, or do Edit > Add Files or shift-apple-F.



Then select File > Create PAR Set or shift-apple-A



The next dialog is asking you how much parity data to generate. You need to put in over 50, for safety I choose 55. The less equal you chunks, the greater the %ge you need.


We get a whole bunch of files which represent the parity data


You can test that you can recover you data is either chunk 1 or 2 is lost by removing one of those chunks from the directory, and double-clicking on the .par2 file. It will load into MacPAR deLuxe and you should get the 'missing but can be recovered' message.

Now, RAR the parity files together. Its easiest to move them to their own folder, then run

$ /applications/rar/rar a photos.part3.rar *

and you get


Now you have 3 files of which any 2 will allow recovery of the data.

Thursday, October 14, 2010

Backing up selected file using expanding disk image on OSX

I was looking for a way to backup my photos online using Google Storage or Amazon S3. But I don't need (as a rule) to backup my .jpg files or the .psd files Photoshop makes. For disaster recovery eg the house burns down, the minimum is the .nef files.

One way I can do this is to create disk images containing only the file types I need

First I created a disk image of type 'sparse disk image'.

File > New > Blank Disk Image


give the image a name in the top of the box,


and change the settings at the bottom. Because this is a sparse image, it expands as you add more files and data to it, so even setting it to be DVD sized doesn't take up much space straight away. Think of it more as the maximum size you want it to get.


Then after clicking 'Create' you are asked for a password. Make it a good one! If for some reason you don't want the image to auto-mount on your own Mac, then you need to deselect 'remember password in my keychain'


then Disk Image goes and creates your image, and mounts it on the desktop for you


After that you can search for the files you want to back up, and simply drag them onto the mounted disk image




and here they are

Tuesday, October 12, 2010

Google Storage vs Amazon S3

Google Storage
from https://code.google.com/apis/storage/docs/overview.html#pricing
Amazon S3
from http://aws.amazon.com/s3/
Storage—$0.17/GB/month
data in: $0.10/GB
data out:
$0.15/GB for Americas and EMEA
$0.30/GB for Asia-Pacific
Requests
PUT, POST, LIST—$0.01 per 1,000 requests
GET, HEAD—$0.01 per 10,000 requests
High durability:
$0.150 per GB
Low durability:
$0.100 per GB
data in:
Free until November 1st, 2010**
data out:
First 1 GB / month: free
next 10Tb / month: $0.190 per GB
PUT, COPY, POST, or LIST: $0.01 per 1,000 Requests
GET and All Other Requests: $0.01 per 10,000 Requests


So based on that, seems like Google did a copy/paste of the S3 price list, but made the actual storage more expensive. Its not clear from Google if the storage has a durability SLA.

Looks like S3 is the better bet based upon pricing.


https://docs.google.com/document/pub?id=1qBweKcoATMzOGDkhtSzEZSovw2MT8FKD2YLx2RthxsU&

Sunday, October 10, 2010

X-Lite VOIP / SIP back on Snow Leopard

I've tried most (all?) of the OSX / Mac VOIP / SIP clients, and the only one I've had any luck with is X-Lite from Counterpath.

But then I upgraded to Snow Leopard and v3 broke. They released a v4 beta, but that timed out and you could only make calls by setting your system clock back before July 2010. Sigh.

But now its back, in full v4 release. Woot! Thanks guys!