by R.I. Pienaar | Feb 26, 2006 | Usefull Things
Most people who read this probably know by now I’m a bit of a mapping geek, I’ve been keeping track of my comings and goings since around 2000 using my trusty Magellan GPS 315. A few years back though I had a bit of a set back when years of tracks and waypoints covering 4 continents got lost when my Laptop got stolen and due to some unfortunate choice in application everything I had was useless since Fugawi requires a Dongle and won’t give me a new one.
A lot has changed since and I’ve mostly moved my whole life online to various services like Flickr. It means that my desktop becomes totally portable since no data resides on it and backups can be centralized etc.
There is a gap in the GPS tracks world though a few online services exist like MotionBased.com but with heavy restrictions for free usage.
I’m busy writing a online application that will allow uploading of GPS tracks in the open GPX format for online storing, tracking, graphing and so forth. The idea is to allow for basic storage of tracks and waypoints for the hiker etc but also to cater to runners, cyclists etc who would like to track statistics over time using GPS units.
Key requirement is for the data to be available to blogs and other personal sites, you can store your data on the my system and it will allow you to display it on your own site if you choose, but only for tracks that you actually mark publicly available.
A quick demo of the data it provides, the below is pulled in directly from the database as it stands at the moment, the links to maps and graphs will work. The graphs especially requires some work still.
(If you do not see a table with information above this then please visit this entry directly via a browser, you’ll need to have javascript enabled, it also seems some services like Bloglines strip out the javascript!?)
The above is from a walk that I took along the London South Bank on Saturday. The few data anomalies are due to bad GPS reception etc, I obviously did not walk on water, I’ll look into ways to normalize the data at import time. This demonstrates though that any blogger can import the data using just one line of code into their own blogs ๐
by R.I. Pienaar | Feb 21, 2006 | Front Page
Just a heads-up that I’m moving my feeds to Feedburner to get a better understanding of my readership, it should be seemless if you’re RSS reader impliment the basic HTTP redirects etc. If however you do notice problems please let me know and I’ll try to fix them.
I’ll post more later on about my experiences using Feedburner so far I’m quite pleased as it seems to be answering a question I’ve had for ages, more later.
by R.I. Pienaar | Feb 13, 2006 | Code, Usefull Things
Sometimes I need to encrypt some stuff but do not want to install PGP or GPG. I typically use OpenSSL for this kind of thing and have written a simple frontend script to achieve strong password based encryption using OpenSSL. Sometimes you need public / private key encryption though, below will show you how to do it using just OpenSSL.
Public/Private key encryption is a method used usually when you want to receive or send data to thirdparties. The system requires everyone to have 2 keys one that they keep secure – the private key – and one that they give to everyone – the public key. Data encrypted using the public key can only ever be unencrypted using the private key. This method of encryption that uses 2 keys is called asymmetric encryption.
So by example if Person A want to send Person B data in a secure fashion she just have to encrypt it with Person B’s public key, only Person B can then open the file using her private key. There are other advantages to this kind of encryption. If I met you in person and gave you my public key, I can send you something electronically using my private key to encrypt it, if the public key you have can decrypt that data then you can trust that it was sent by me, it’s mathematical proof of identity. This is the basis for Digital Signatures.
Using OpenSSL on the command line you’d first need to generate a public and private key, you should password protect this file using the -passout argument, there are many different forms that this argument can take so consult the OpenSSL documentation about that.
$ openssl genrsa -out private.pem 1024 |
$ openssl genrsa -out private.pem 1024
This creates a key file called private.pem that uses 1024 bits. This file actually have both the private and public keys, so you should extract the public one from this file:
$ openssl rsa -in private.pem -out public.pem -outform PEM -pubout |
$ openssl rsa -in private.pem -out public.pem -outform PEM -pubout
You’ll now have public.pem containing just your public key, you can freely share this with 3rd parties.
You can test it all by just encrypting something yourself using your public key and then decrypting using your private key, first we need a bit of data to encrypt:
$ echo 'too many secrets' > file.txt |
$ echo 'too many secrets' > file.txt
You now have some data in file.txt, lets encrypt it using OpenSSL and the public key:
$ openssl rsautl -encrypt -inkey public.pem -pubin -in file.txt -out file.ssl |
$ openssl rsautl -encrypt -inkey public.pem -pubin -in file.txt -out file.ssl
This creates an encrypted version of file.txt calling it file.ssl, if you look at this file it’s just binary junk, nothing very useful to anyone. Now you can unencrypt it using the private key:
$ openssl rsautl -decrypt -inkey private.pem -in file.ssl -out decrypted.txt |
$ openssl rsautl -decrypt -inkey private.pem -in file.ssl -out decrypted.txt
You will now have an unencrypted file in decrypted.txt:
$ cat decrypted.txt<br>
too many secrets |
$ cat decrypted.txt<br>
too many secrets
All of these examples use the RSA encryption method, some hard core mathematical information about it here.
There are a fair few limitations to this approach – it will only encrypt data up to the key size for example. And you really should never encrypt english plain text using a method like this. You’d use this to safely encrypt a random generated password and then aes encrypt the actual text you care about. Look in the comments for examples of that.
by R.I. Pienaar | Feb 8, 2006 | Code
I am in the process of building a automated RedHat Linux installer which requires me to configure the following on a RedHat Enterprise Machine:
RedHat has stopped providing any kind of Java binaries with their base OS, you have to buy a copy of the RedHat Application Server for $999.
As is often the case in this kind of situation there are other options that does not cost money, the group over at JPackage.Org does a great job of packaging all things Java in generic RPMs that will work on most RPM based distributions.
There are limitations though, jpackage is not allowed to distribute binaries of the non-free code such as the Sun JVM itself but they do provide source RPMs that lets you build this on your own after downloading the source from the Sun website.
I have written up a Wiki entry that details from start to end the process in getting the above working on CentOS. CentOS is of course a binary distribution of RedHat Enterprise Linux, they take the opensource SRPMs as provided by RedHat and removes all RedHat branding from the OS giving you a functional equivalent to RedHat Enterprise without the price tag. I use it on my development systems and so for the moment this guide only applies directly to CentOS though the differences are small.
This may look daunting at first but it really is not, once you’ve built the binary RPMs of the non-free code it is a breeze to install many machines with these RPMs using only a few commands and 1 config file. So you’ll soon reap the benefits especially if you are tasked with configuring a cluster of webservers that should all be on the same patch levels.
You can find the full guide here: Tomcat 5 on RedHat Enterprise Linux using JPackage.org Packages.
by R.I. Pienaar | Jan 31, 2006 | Photography
Today I received a comment on my photoblog from photoblogdirectory.org.
Our robot found your rss-feed you are providing
on your photoblog website (http://photoblog.devco.net/) and added it to our listings.
Would be nice to see you claiming your blog @
http://www.photoblogdirectory.org/claim/xxxxx/
http://www.photoblogdirectory.org is dedicated to support the photobloggers community,
feature new/interesting photoblogs on the scene, rate the best
and send visitors to the photobloggers sites.
regards,
Gloria Jones
Webmistress @
http://www.photoblogdirectory.org
What can I say? This is just the worst kind of site promotion I’ve ever seen, they are really showing that they are just one step above common viagra spammers, online casino spammers and the like.
I’d urge any photographers who read this site to boycot photoblogdirectory.org.