Clean up Picasa 3.9 contacts.xml with beginner perl commands at your friendly bash $ prompt.

So your Picasa 3.9 contacts are all messed up and you cannot edit some of them because they are linked to various google accounts. Next time, try to keep it clean by having email addresses for all your contacts. (Kamal even uses fake ones to help keep things linked, I don't go that far.) Valid email addresses will help Picasa 3.9 match your contacts up better as you switch from account to account. For now, take the power back and edit freely in Picasa offline, by logging out then removing all the links using the perl lines below:

#Get into your wine contacts folder:
cd "/home/USER/.wine/drive_c/users/USER/Local Settings/Application Data/Google/Picasa2/contacts/"

#Make a backup:
cp -a contacts.xml backup-contacts

#Remove all the "subject user" lines:
perl -n -i -e 'print unless /subject user|^$/;' contacts.xml

#Remove all the profile_photo_url tags:
perl -p -i -e "s/(profile_photo_url=\"([^\"])*\" )//g" contacts.xml

#Remove all the google_plus_id tags:
perl -p -i -e "s/(google_plus_id=\"([^\"])*\" )//g" contacts.xml

#Remove all the gaia_id tags:
perl -p -i -e "s/(gaia_id=\"([^\"])*\" )//g" contacts.xml

#Look what you did and clean it up more by hand if you like:
vi contacts.xml


Improve and simplify this if you like. These perl docs are really good:
http://perldoc.perl.org/perlrequick.html
http://perldoc.perl.org/perlrun.html
Mastering Regular Expressions, 3rd Edition
Other Picasa 3.9 Notes:
Picasa 3.9 added the option to store Nametags in the Metadata that is part of each photo file. No more lost tags when you copy JPG's elsewhere. Turn it on by Tools -> Options -> Name Tags -> Store Name Tags in Photo. Fix your old files with Tools -> Experimental -> Write Faces to XMP. This will take a long time as all your JPG files will be changed. Exif Viewer

Two Factor SSH Authentication with Google Authenticator - Time-based One-time Password (TOTP) algorithm specified in RFC 6238

apt-get install libpam0g-dev
mkdir /usr/src/pam-ga
cd /usr/src/pam-ga
wget https://google-authenticator.googlecode.com/files/libpam-google-authenticator-1.0-source.tar.bz2
sha1sum libpam-google-authenticator-1.0-source.tar.bz2
017b7d89989f1624e360abe02d6b27a6298d285d  libpam-google-authenticator-1.0-source.tar.bz2
tar -xjvf libpam-google-authenticator-1.0-source.tar.bz2
cd libpam-google-authenticator-1.0
make
make install
cat README
vi /etc/pam.d/sshd
auth required pam_google_authenticator.so nullok
vi /etc/ssh/sshd_config
ChallengeResponseAuthentication yes
service ssh restart
google-authenticator



http://www.threadstates.com/articles/2012/ssh-two-factor-authentication-with-google-authenticator.html

http://www.howtogeek.com/121650/how-to-secure-ssh-with-google-authenticators-two-factor-authentication/

https://code.google.com/p/google-authenticator/
https://code.google.com/p/google-authenticator/wiki/PamModuleInstructions