30/08/10

Permalink 11:57:09 am, Categories: News, 42 words   English (UK)

New Zealand Info Directory

Today we have launched our New Zealand Info Directory under new-zealand-info.co.nz domain name. Users of Google.co.nz will benefit most as our directory covers New Zealand domain names only. Directory will grow as we discover more .nz web sites

27/08/10

Permalink 01:24:26 pm, Categories: General, 143 words   English (UK)

Google Application Engine and DataStore Data Removal

Google App Engine has free quota limit of 1.00 GBytes for Total Stored Data. My current application has exceeded that limit causing system to generate 500 Internal Error messages. There is no easy way to remove data from DataStore.

My trick is to delete records in batch and using loop until you get DeadlineExceededError Exception. Typically I can remove 1000 rows per call

You can schedule cron job to execute this code every hour so old records are deleted automatically

start=time.time()

date_keep=(datetime.date.today()-datetime.timedelta(days=30)).isoformat()

sql="SELECT __key__ FROM TBL_TOP_URL WHERE UPDATED < DATE('"+date_keep+"') LIMIT 100"
print sql
    
rows=[None]
while len(rows) <> 0:
    query = db.GqlQuery(sql)
    rows = query.fetch(100)
    print 'len(rows):',len(rows)
    db.delete(rows)
        
    print time.time() - start
    if len(rows) > 0:
        print rows[-1].id()

31/03/10

Permalink 02:17:34 am, Categories: General, 92 words   English (UK)

Python 3D GPS tracks plotting with elevation

Python is open source software and mature language. You can create commercial software using free tools with Python.

I have developed GPS tracks plotting software with elevation information in 3D space. Mapsource gives you only 2 dimensional view so gradient is not visible and you loose a lot of information

I have used wxPython for the GUI and py2exe to create software distribution package

GPS tracks data is read from .GPX file which needs to be exported from Mapsource

Have a look if you own GPS device such as Garmin or others

08/02/10

Permalink 10:52:55 am, Categories: News, 27 words   English (UK)

Canada Information Directory

February is launch of our Canada Info Directory. Currently there is over 100,000 domains in the database but it will grow slowly as we discover more .ca sites

20/01/10

Permalink 06:57:43 am, Categories: General, 165 words   English (UK)

Automated backup using ssh and encryption to safeguard data

Linux server is better than Swiss army knife. Using pipes you can join commands together to process and transform data.

Task:

Automatically backup entire folder to encrypted file and upload in secure manner to backup server using minimum of disk space.

Code:

#
# install as cronjob, must escape any % as \% otherwise it becomes newline
#
tar cvf - /home/tom | gpg --no-tty --passphrase-file pass.txt -c - | ssh user@backup.com "cat > tom.tar.gpg"

Explanation:
--no-tty is required for cronjob as there is no tty attached during execution
pass.txt will contain your symmetrical password

#
# create tarball containing entire folder and send output to stdout
#
tar cvf - /home/tom

#
# read from stdin and encrypt data stream using pass phrase in file pass.txt
#
| gpg --no-tty --passphrase-file pass.txt -c -

#
# read from stdin data stream and send via secure shell to backup server as tom.tar.gpg
#
| ssh user@backup.com "cat > tom.tar.gpg"

for more info try

man tar
man gpg
man ssh

:: Next Page >>

Africa's OSS/Linux All Blogs


This blog is actually a very special blog! It automatically aggregates all posts from all other blogs. This allows you to easily track everything that is posted on this system.

| Next >

August 2010
Mon Tue Wed Thu Fri Sat Sun
<<  <   >  >>
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Get Linux in South Africa Pretoria on DVD or CD, SUSE, OpenSuse, Fedora, Mandriva, Knoppix, Mandrake, Debian, DamnSmall, DSL, Gentoo, Slackware, SimplyMepis, Monoppix, FreeBSD, Trustix, Comodo, Smoothwall, Gibraltar, IPCop, OpenCD, Ubuntu, Kubuntu, Redhat, CentOS, Whitebox, PCLinuxOS, Xandros, Vector, Scientific, OpenOffice, Vector, Foresight, Asterisk

Search

Linkblog

Misc

Syndicate this blog XML

What is RSS?

powered by
b2evolution