by R.I. Pienaar | Jun 19, 2006 | Code
There is a new version of GMapEZ that brings with it some new features, I’ve implimented some of these into GMaps PHP.
As you can see from the screenshot above the map now supports varying sizes of markers, the small ones are good for maps with lots of points but obviously they do not support any kind of text on the marker.
To activate mini icons for a specific type of point you need to edit your config file:
[types]
visit = orange mini
transit = blue
lived = green
The above configuration snipped will make any points of type visit to be small markers.
The other change in this version is simply a little mouse-over window that will show the title of any point when you hover over it, activating this feature does not require any config changes.
These features will only be available to you if your config file points to the latest version 2 of GMapEZ:
[misc]
gmapez=http://bluweb.com/chouser/gmapez/gmapez-2.js
There is one more feature in GMapEZ 2.2 that I did not include in this release, it supports tabbed popup windows, if anyone need these please drop me a line and I’ll look at including them.
GMapEZ also supports drawing lines, I may include support for these if there are demand for it, personally I don’t need them but if someone does, leave a comment here and I’ll keep it in mind for the next release.
Upgrading from 1.4 to 1.5 is really simple, simply replace the gmap.inc.php from your site with the one in the tarball below. Then make the optional config change above if you’d like mini icons.
As always you can get the latest version at http://www.devco.net/code/gmapsphp-current.tgz and full documentation can be found on my Wiki
by R.I. Pienaar | May 20, 2006 | Code
The author of GMapEZ released a new version of his javascript that supports the new version of Google Maps.
I’ve had some mails asking me to support the new version but as it was in Beta till this morning I delayed doing a full release of the new code till now.
Upgrading from 1.3 to 1.4 is really simple, simply replace the gmap.inc.php from your site with the one in the tarball below. You also need a small change in your config file for your map, the url to the GMapEZ has changed:
[misc]
gmapez=http://bluweb.com/chouser/gmapez/gmapez-2.js
With this in place, if you open a map it should still look roughly the same, but if you scroll over France – or in fact all of Europe – you’ll see street level maps now, in future some of the newer Google features are likely to be supported.
Get the code at http://www.devco.net/code/gmapsphp-current.tgz, full documentation can be found here
by R.I. Pienaar | Apr 6, 2006 | Usefull Things
I’ve been a fan of virtualization for some time, been a very early user of VMWare years ago in fact version 2 of my iScan appliction was written entirely inside VMWare while stuck in a hotel in Athens around 2001. Things since then has come a long way especially on Intel hardware.
Intel has introduced their Virtualization Technology extensions on their recent chips to enable the CPU to run multiple operating systems on the actual CPU, much like main frames have been able to do for ages.
Virtualization enhanced by Intel Virtualization Technology will allow a platform to run multiple operating systems and applications in independent partitions. With virtualization, one computer system can function as multiple โvirtualโ systems. With processor and I/O enhancements to Intel’s various platforms, Intel Virtualization Technology can improve the performance and robustness of today’s software-only virtual machine solutions.
I’ve been very excited to get my hands on both hardware and software together that lets me explore this exciting technology and today that was delivered in the form of my Apple iMac Core Duo machine running Parallels Workstation.
Parallels Workstation 2.0 is the first desktop virtualization solution to include a lightweight hypervisor, a mature technology originally developed in the 1960s to maximize the power of large mainframes. Hypervisor technology dramatically improves virtual machine stability, security and performance by using a thin layer of software, inserted between the machine’s hardware and the primary operating system, to directly control some of the host machine’s hardware profiles and resources. It not only makes Parallels Workstation-powered virtual machines secure, stable and efficient, but also empowers users to immediately realize the benefits associated with Intel VT hardware virtualization architecture.
The good thing is it works on OS X on Intel hardware and allows you to run most operating systems. I grabbed a copy of FreeBSD 6.0 and immediately knew it was fast, only later did I realise how fast.
I wanted to see if I can get my 2nd Core to appear as a 2nd CPU in the guest system so I built the included GENERIC SMP kernel, the build time was just short of 17 minutes. The VM was allocated 256Mb RAM and was running on my 1800mhz Intel iMac. At the time I had Thunderbird, Deerpark, NetNewsWire, Terminal, Adium, Activity Monitor and MS Word (under Rosetta) open.
I then took my AMD 1800Mhz with 512Mb RAM machine also running FreeBSD 6.0 and did the same build, the build time on that was 18 minutes.
I realise this isn’t the most scientific of tests, but it far exceeds any performance indication on any VM I’ve ever seen, I’m really looking forward to one day having a Bladecenter full of machines capable of running this technology and doing a full VMWare based architecture, the advantages that virtualization brings to the table is staggering. If you ever get a chance to see a real demo of VMWare’s enterprise products I’d strongly suggest you jump at the oppertunity.
by R.I. Pienaar | Mar 24, 2006 | Code
I’ve often seen questions on lists by people who want to save all incoming and outgoing mail on a specific server in an archive, this is usually due to some auditor requesting it or corporate legal types requesting it.
The Exim documentation says it can be done but does not give examples neither does any of the two Exim books, the mailing lists are short of working examples and Google does not help either! Eventually came across a russian language site that had a working setup so I figured I’d document it here in English.
The basic idea is I want a maildir made that has sub folders for each user containing incoming and outgoing mail.
You’ll need to use 2 types of Exim configuration, one being a System Filter and one being a Shadow Transport.
Handling outgoing mail is done using the system filter, I’ll set this up to only affect mail matching domain.com. In the main Exim configuration configure the basics of system wide filters by simply adding the following to the top section:
system_filter = /etc/exim/systemfilter.txt
system_filter_directory_transport = local_copy_outgoing
This defines the file where the filter will live as well as a transport that will be used to delivery the mails created by the filter. You could potentially use one of your existing transports, I like using a separate one for clarity, in your transports section add the local_copy_outgoing:
local_copy_outgoing:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
group = exim
user = exim
mode = 0660
maildir_format = true
create_directory = true
NOTE: This is using user exim and group exim, you want to adjust it for your local needs.
Now simply create the filter in /etc/exim/systemfilter.txt:
if $sender_address_domain is domain.com
then
unseen save /var/mail/domain.com/mailarchive/.${tr{$sender_address}{.}{_}}.outgoing/
endif
This filter will save the mail in a maildir under /var/mail/domain.com/mailarchive/ the mailbox for a name.surname@domain.com user will be name_surname@domain_com.outgoing using this format means most IMAP clients will display it nicely since .’s tend to confuse them a bit. You can adjust this to taste.
Incoming mail is easier, Exim provides a shadow_transport facility that lets you call another transport for each local delivery, this transport will get a copy of the mail and its result won’t affect the further deliver of the actual email, perfect for calling vacation type commands or doing this kind of mail copying.
My needs are only for intercepting mail that reaches the Maildir’s so I’ll only need to hook into my address_directory transport, if you have other needs like intercepting actual real unix account emails then you can hook into the local_delivery transport using the same method. My address_directory transport looks like the one below, the last 2 lines are the important ones.
address_directory:
driver = appendfile
create_directory
delivery_date_add
directory_mode = 770
envelope_to_add
maildir_format
return_path_add
shadow_transport = local_copy_incoming
shadow_condition = ${if eq {$domain}{domain.com}{yes}{no}}
This calls a transport called local_copy_incoming to deliver the copy of the email, just add the following into your transports again adjusting user id, group id and file paths to your liking. This will do the file name expansion in a similar format I’m just using a slightly more complex form of the text replace here as a different example of things you can do, end result is the same.
local_copy_incoming:
driver = appendfile
directory = /var/mail/domain.com/mailarchive/ \
.${tr {$local_part}{.}{_}}@${tr {$domain}{.}{_}}.incoming/
delivery_date_add
envelope_to_add
return_path_add
group = exim
user = exim
mode = 0660
maildir_format = true
create_directory = true
NOTE: The above line that ends in “\” is a continuation onto the next, remove the “\” and join the two lines in your config.
You can now restart your Exim server, if you’ve done it all right and created the main Maildir where this all live under your incoming and outgoing mail for domain.com will all be saved on a per user basis.
by R.I. Pienaar | Mar 14, 2006 | Front Page
When I was in Sydney around 2000 there was a Russian protype space shuttle on display, before then I didn’t even know something like it existed.
It was called Buran which means blizzard or snowstorm in russian. The specific one on display there never left the athmosphere it was just a test vehicle for the aero dynamics etc but the program did get a craft up in space and back down to earth safely.
Wikipedia has an entry on the Buran in general, it mentions this specific Buran:
The OK-GLI test vehicle was fitted with four jet engines mounted at the rear (the fuel tank for the engines occupied a quarter of the cargo bay). This Buran could take off under its own power for flight tests, in contrast to the American Enterprise test vehicle, which was entirely unpowered and relied on an air launch.
After the program was cancelled, OK-GLI was stored at Zhukovsky Air Base, near Moscow, and eventually bought by an Australian company, Buran Space Corporation. It was transported by ship to Sydney, Australia via Gothenburg, Sweden โ arriving on February 9, 2000 โ and appeared as a static tourist attraction under a large temporary structure in Darling Harbour for a few years.
Visitors could walk around and inside the vehicle (a walkway was built along the cargo bay), and plans were in place for a tour of various cities in Australia and Asia. The owners, however, went into bankruptcy, and the vehicle was moved into the open air, where it suffered some deterioration and vandalism.
Click the image above for my set of photos I took there.