Posted by & filed under Galium.

Galium 0.29 released!

  • 100% Fixed the confusing template, where logout showed up, without being logged in!
  • 100% You can now (again) switch between local and remote hosting of domains :)
  • 90% Users can now add A, AAAA and CNAME records.

How to upgrade?
If you have installed Galium 0.2 or later, updating is as simple as just replacing all the updated files. If not, go to the directory where you installed Galium, and type ‘php ./apps/doUpdate.php’

tim@timg:/var/www/galium$ ./apps/doUpdate.php
=> Galium Cron Service v0.2b
--> Loading configuration ...
--> Connecting to MySQL ...
=> Checking if the database needs an update ...
=> Updating to database version 4
--> Running UPDATE-0002.sql ...
----> OK!!!
--> Running UPDATE-0003.sql ...
----> OK!!!
--> Running UPDATE-0004.sql ...
----> OK!!!
--> OK!

Easy! Download the latest Galium here.

tim@timg:/var/www$ diff -ur galium.old galium | diffstat
 galium/apps/domainCron.php                                |  150 +++++-----
 galium/conf/config.php                                    |    4
 galium/www/Applications/User/Manage.php                   |  149 ++++++++-
 galium/www/Libraries/Backend.php                          |   32 ++
 galium/www/Skins/bea../Template.php                       |   16 -
 galium/www/Skins/bea../Temp..s/Man../Dom..Records.php     |   18 -
 galium/www/Skins/bea../Temp..s/Man../lis..omains.php      |    6
 12 files changed, 273 insertions(+), 103 deletions(-)

Posted by & filed under OpenNIC.

In around six hours (in other words, in 24 hours, knowing me) I am going to be releasing an update to Galium, which will finally allow (after how many weeks?) using the name servers from the top level domain, but allowing users to specify their own DNS records. In other words, DNS records would be hosted by us, which would remove the need for glue servers in some cases.

Also, in other news, the .gopher and the .geek top level domains either are – or will soon be – powered by Galium! Next step; world domination!

Posted by & filed under MyBanco.

  • 100% Detect if all required modules are in PHP
  • 90% Insert SQL dump into MySQL
    • Could be improved on the SQL file import side

Coming to the next release, which is due in seven days, is the ability for people people to gain money for posting on a forum!

Posted by & filed under Experimental.

No! When I Xen, I am not talking about a relationship to foreign material. Well, that is – not exactly. Xen is an open source hypervisor. Think: VMware, but much, much cooler.

I was talking to Tim Post, about a project that I was completing for ShareSource2. Basically, the conversation came to the point where I said that I was using OpenVZ for my server virtualization. Tim then came to me and said “Why don’t you just use Xen”.

Well, I was not born yesterday – I did tell him that I had tried Xen, and that when I tried it – it just refused to work.

Then Tim pointed me to Xen unstable, a mercurial repository containing a version of Xen that does not need a new CPU to actually boot up.

Xen unstable, the version I checked out yesterday, is actually tagged as being “3.2.0-rc4″, which probably means that it is coming it’s way to becoming a nice stable Xen product that people other then me have actually been able to use.

This is what I used on my Debian to be able to install a Xen-enabled kernel:

~# mkdir Xen
~# cd Xen
~# hg clone http://xenbits.xensource.com/xen-unstable.hg
[[ wait for around 3 minutes while it grabs Xen’s history
~# cd xen-unstable.hg
~# apt-get install bin86 bcc
~# make world
[[ Note: this step will also check out a 2.6.18.8-xen kernel ]]
~# sudo make install

Then I had to add an entry to my /boot/grub/menu.lst which looked like this:

title Xen 3.2 / XenLinux 2.6
kernel /boot/xen-3.gz console=vga
module /boot/vmlinuz-2.6.18.8-xen root=UUID=66559e96-e405-4a1d-be28-b8caf5b5b89d ro console=tty0
module /boot/initrd-2.6.18.8-xen.img

Reboot, select my new kernel, and faster then you can say “WOW IT WORKS” it was booting me into a brand new (well, actually, my OpenVZ kernel was 2.6.20 – so a brand old) kernel

To try Xen out, just go over to http://jailtime.org and download an image of a nice operating system (I chose CentOS 5.1). When you have downloaded your image, do the following:

tar -xvf {downloaded image name}
ls -lar
xen create -c {smallest file (usually)}

and Voila! First thing you should be introduced to is a nice Grub screen welcoming you to your Xen experience.

I am still as of today yet to actually have built my own Archlinux or Frugalware Xen image. If anyone knows how to do this successfully, please drop me a line or leave a comment!

Posted by & filed under ShareSource.

ShareSource will finally get propper RSS feeds! After how long? There has been site news RSS feeds for quite a while in ShareSource. All you have to do is add the feed http://sharesource.org/api/rss/site.rss, but this update will actually mean that there is support for RSS feeds with project news, commit updates and much, much more!

The push date that will add support for cool RSS will be the 16th August 2008!

See you when you get there :)

Posted by & filed under MyBanco.

I have just added a zip version of MyBanco at the download site, so that people who are not advanced enough for Linux or OS X (only mucking around… seriously) can download MyBanco and upload MyBanco to thier webhost.

You can download MyBanco from the usual place. Remember, it is licensed under the Affero General Public License, which is a special license saying that any source code that is changed in MyBanco must be shared with the network that the modified code runs on. That is, if all you do is run MyBanco on a local network, say for a University, you need to only share the modified code with the university. If the code runs on a public network such as the internet, the modified code must be shared with the internet.

Posted by & filed under MyBanco.

I got an email earlier this morning, asking me how hard it would be to “make something that can activate a transaction when an action happens in another code”. I thought about it for thirty seconds, and realised that it would not be too hard. Infact, it was super easy to do.

There are two ways that it can be done, the MyInfo way, which is complicated, and the MySQL way, which will be the easiest (for the moment). A simple transaction taking place will take about 12 lines of code.

In Psuedocode:

mysql_connect("database.server.com", "root", "password");
mysql_selectdb("myinfo");
if (mysql_error) die "Can't connect to DB";
$SQL = 'INSERT INTO `transactions` (
          `transactionTime`, `from_aid`,
          `to_aid`, `amount`, `description`
        ) VALUES (
          UNIX_TIME(), "$from", "$to",
          "$amount", "Transaction from app"
        )'
mysql_query($SQL);
if (mysql_error) die "fail.";

And that is pretty much it. Not only does it add money to an account (the $to variable)… but it takes it out of an existing account in MyBanco. The only bad thing with using this is that there are no checks done to ensure that the central bank account (the $from) does actually have the right amount of money in there.

Adding this is done with a simple peice of code (in PHP):

if (!$aid) return array('error' => 982);

$SQL = 'SELECT SUM(`amount`) as `positive`
	FROM `transactions`
	WHERE (`to_aid`="' . $aid . '")';

$mr1 = mysql_fetch_array(mysql_query($SQL));
$money_pos = 0;
if($mr1) {
        $money_pos = (is_numeric($mr1["positive"])) ?
                $mr1["positive"]:0;
}

$SQL = 'SELECT SUM(`amount`) as `negative`
        FROM `transactions`
        WHERE `from_aid`="' . $aid . '"
                AND `from_aid`<>`to_aid`';

$mr2 = mysql_fetch_array(mysql_query($SQL));
$money_neg=0;
if($mr2) {
	$money_neg=(is_numeric($mr2["negative"])) ?
                $mr2["negative"]:0;
}

return number_format($money_pos - $money_neg, 2);

Pretty easy, huh? Now all you have to do is before you insert the row into the transactions table, make sure that __bank_amountForAccount($from) is >$amount … and then you will never have “magic” money being circulated around the MyBanco bank system that ultimately should not exist.

Posted by & filed under ShareSource.

In the past few days, I have been working on making ShareSource a little more search engine (and in some cases user friendly).

The changes all round are pretty minor, but they were necessary things that had to be done, as Google Webmaster Tools said that ShareSource had around 3,000 pages with the same title!

Well, most of the changes have been pushed to the live server, and include changes such as:

  • The commits log showing what page you are on if the page is not page one.
  • The ShareSource project Search showing the query that you have made.
  • Project file releases have a nicer title … which is based on the project’s info.
  • Screenshots is similar, all screenshots now have a (pretty) unique title
  • The ShareSource Wiki knows that it sometimes needs to ditch useless parts of it’s URL, so it redirect to a better, nicer and shorter URL
  • Fixed a few spelling mistakes again (like facilies => facilities on the home page!)
  • Fixed a few broken URL’s on the project link bar.

Did I mention that is only the top seven? Plenty more changes were made as well as those.

The fact of the matter is now ShareSource will be a nicer place for search engines to crawl. The aim is also that the site will now get a bit of a bigger Google Rank, because there is no more duplicated content on the ShareSource site.

Posted by & filed under MyBanco.

# diffstat mybanco-0.03-to-0.04.patch
CHANGELOG               |  4 ++++
Skins/Simple/Simple.php | 38 +++++++++++++++++++++++++++++++++++++-
backend/index.php       | 28 ++++++++--------------------
backend/test.php        |  7 +++++++
libs/MyInfo-Client.php  |  7 +++----
5 files changed, 59 insertions(+), 25 deletions(-)

Mainly a bugfix release. Fixes the following issues:

  • Data sent to MyInfo is now always unescaped.
  • Nice pretty runtime errors for MyBanco.
  • The right MyInfo server is now always selected.

Most of these are changes I have made because of errors that were seen on dr-spangle’s local install of MyBanco. You can download either the update package (14KB) or the entire package (200KB) at the MyBanco website.