Archive for the 'Backup and restore' Category

Linux: Copy file and directory permissions

How do you copy permissions recursively from one directory to another if you forgot to do ‘cp -rp’ when copying.

 

 

Continue reading ‘Linux: Copy file and directory permissions’

Make a VCARD file of your Facebook friends

This script is OLD. It does not work on the new facebook

A hot tip to get a VCARD file of your facebook friends.

Go to http://www.facebook.com/mobile/?phonebook and paste this javascript in the URL:

javascript: var s=""; for each(person in document.getElementsByClassName("info")) { if(person.firstChild) { s+="BEGIN:VCARD<br>VERSION:3.0<br>"; var fullname = person.firstChild.firstChild.innerHTML.split(" "); var firstname = fullname[0]; var surname = fullname[1]; s+="N:"+surname+";"+firstname+";;;<br>"; s+="FN:"+firstname+" "+surname+"<br>"; var phone=person.childNodes[1].innerHTML; var phonenumber = phone.substring(0,phone.search("<span")).replace(/\./g,"-"); if(phone.search("<span>M</span>") != -1) { s+="TEL;type=CELL;type=pref:"+phonenumber+"<br>"; } else if(phone.search("<span>L</span>") != -1) {    s+="TEL;type=HOME;type=pref:"+phonenumber+"<br>";  } if(person.childNodes[2]) { phone=person.childNodes[2].innerHTML; phonenumber = phone.substring(0,phone.search("<span")).replace(/\./g,"-"); if(phone.search("<span>M</span>") != -1) { s+="TEL;type=CELL;type=pref:"+phonenumber+"<br>"; } else if(phone.search("<span>L</span>") != -1) { s+="TEL;type=HOME;type=pref:"+phonenumber+"<br>";  }   }   s+="END:VCARD<br>"; } } document.write(s);

sync-liferea.sh syncing script


I wrote this liferea syncing script for liferea yesterday. It seems to work as I wanted.. When I’ve got some problems, the backup that this script implements helps me solving the issues. I’m pleased with how this script makes my RSS more joyful.

I hope you can get some good ideas or that this script helps you sync your RSS feeds.
Continue reading ’sync-liferea.sh syncing script’

Sync Liferea – How to synchronize what items you have read between two pcs

I’m going to make some ideas/thoughts about how to synchronize what you have read of your RSS feeds between two computers. I have wanted to do this for a while now.

First part is if you want to do the sql-stuff to export and import the items that you have marked as read.

Alternative1: Export a list of read items from liferea.db on pc1 and update items in liferea.db on pc2
First, make sure to turn of Liferea on both computers. It locks the sqlite database so it is not possible for us to export the list of items that are read on pc1 or update them on pc2.
Make sure to have backup of both computers. I just say this so you don’t blame me.
Continue reading ‘Sync Liferea – How to synchronize what items you have read between two pcs’

rsnapshot 1.3.0 in ubuntu

Here is how to make the rsnapshot package in debian/ubuntu style: Continue reading ‘rsnapshot 1.3.0 in ubuntu’