Archive for October, 2006

-image-Firefox 2 is released

So firefox 2 the latest release from Mozilla is out to the public today, and so I am typing this to you from it.  I think its looking good, though I am not sure what it is doing to the padding on the backend of Wordpress.

I am really liking the built in spell checker.  Its a nice feature particularly when you spend a lot of time typing into websites.

Firefox2

Available from http://www.mozilla.com as always.


-image-Wakeonlan nforce and Ubuntu

So with my new Ubuntu server, I thought that I would shut it down everynight to save electricity, as it is taking about 100W constantly with all the harddrives spinning.

I am using an NForce motherboard, and using wakeonlan to start it up remotely, or when needed. So heres how I did it:

First I went into the motherboards BIOS and enabled all the power on lan settings, then I checked to see what the settings are on the box once it was booted.
sudo ethtool eth0

WOL was set to ‘D’ (disabled) so to enable it:
sudo ethtool -s eth0 wol g

Then I wanted it enabled everytime at boot so I edit:

sudo vi /etc/network/interfaces

And put in this line after telling the box to get its DHCP:

up ethtool -s eth0 wol g

Then I edit these to files and remove -i

vi /etc/init.d/reboot /etc/init.d/halt

Then shutdown the machine:

shutdown -h nowAnd from another (Debian Linux) machine I used wakeonlan to wake it, but the crucial thing is to put the MAC address in in reverse. This is a bug on NForce motherboards so you probably won’t have to do it with others.


-image-Langalist

The excellent Langalist now has a blog up at  http://www.langa.com/blog/  to compliment the always excellent email list.

Today I am going to try out the X1 desktop indexed search tool that they recommended.  For more information on that either check out langa blog or visit http://www.x1.com/download/
directly.


-image-YUI and Camino

So I have been adding some AJAX goodness to the new site that I am building (all will be revealed soon after testing!) and after some help choosing a framework I decided upon Yahoo’s YUI.

It helps that some others are already looking at this library, but I am so far having trouble with Camino.

Camino is my favorite browser on the Mac by far, so of the niceness of the Gecko browsing engine along with better Mac integration but should I support it. I want to degrade it nicely, turning it over to my normal XHTML forms but I have yet to find a way. So I am going down the route of trying to find out manually.

Even though its a minor browser I still feel that I should do my best, to find out how I decided to look at the stats for this site over the past 2 months to see using what and this is the result:

Firefox: 52.38%
Internet Explorer: 34.21%
Safari: 6.24%
Opera: 3.53%
Mozilla: 1.89%
Konqueror: 0.72%
Camino: 0.69%
Netscape: 0.24%
Mozilla Compatible Agent: 0.07%
Galeon: 0.03%

So quite minor, but I like Camino so I should, and I like Opera so I just need to check that on a Mac, but I wouldn’t be surprised if that figure is me!

updates to come.


-image-Zussaweb modifications for Newzbin

Today I modified Zussaweb, the PHP frontend to HellaNZB that I mentioned in a previous post.

I like Zussaweb, but it was missing one crucial thing for me, and that was that it didn’t accept Newzbin ID’s which is about the quickest way to get a file from Newzbin’s listings.

I therefore patched Zussaweb and put in the form.  It only took 10 minutes including the testing, but now I have a great little program with most of things I liked about hellahella without the pain that went with it.

I have emailed a maintainer of Zussaweb to ask if they would consider my update being in the main distribution but if this is not possible I am going to post up the details here.


-image-HellaNZB options and configuration

As regular readers know I am rather partial to a Usenet program called HellaNZB. Its basically a python application that deals with downloading archives from Usenet either being supplied with a NZB file or a newbin ID. After this is decodes, unrar’s, and pars the file if necessary.

I have recently upgrade to a new server with alot of disk space (on RAID5) and I took the decision not to install HellaHella. I have posted up details of getting HellaHella working through apache2, but its not worth it. This time I am going for a pure Debian/Ubuntu setup and to get the framework installed for HellaHella requires far too much fuss. The Egg support is wrong for one thing.

So I am now using ZussaWeb. This is a PHP based webpage through which you can get various information from HellaNZB and upload NZB files. One feature I have requested is to be able to input NewzBin IDs but it seems one of the developers doesn’t have access to Newzbin at the moment so I might end up writing a patch myself.

Zussaweb is far easier to install than the Pylons based hellahella, and uses less resources if you are already running apache2 than the development HTTP server that Pylons uses. I see no reason to use Pylons anymore (and frankly Django as a framework is far far better but thats a different story).

One this that I always forget with HellaNZB is the command line options which if you are running HellaNZB as a daemon processs files off XMLRPC calls to HellaNZB to do various tasks. For instance:

hellanzb.py enqueuenewzbin 1234567

would contact Newzbin.com and start processing the files with the ID 1234567. I have hellanzb.py under /usr/bin/ so its automatically on my path. Further options are available to view in the python code that comes with HellaNZB in the file: Hellanzb/HellaXMLRPC/__init__.py

Here are some more useful commands:

hellanzb.py pause
hellanzb.py continue
hellanzb.py shutdown
hellanzb.py status

I have put into the optional excerpt of this post a sample from the code with more calls in and hopefully this will provide an easy reference to this underdocumented area.


-image-Really useful list of small linux howto’s

At first I didn’t see the point of the list, but its a nice example of how experienced users setup certain things such as group sharing and also how to do certain tasks.

http://ftp1.sourceforge.net/souptonuts/How_to_Linux_and_Open_Source.txt


-image-Django site comments and all!

I haven’t been posted that much here recently and thats because I have been doing other things and working on other sites. I have also built a new server for home, which will be detailed later, but first and foremost I am still playing with Django and build a site using it.

I have had enough with doing WordPress sites, and although I do know it fairly well I wanted to write something a bit more tailored to the application. And its a good test for the plans I have for other applications later on.

Django I am enjoying, but its not with out frustration. And although in parts it is amazingly well documented for a framework thats been in the public eye for a relatively shorttime it does miss out on the docs in some parts. I am finding that some things are overdocumented and its hard to find relatively simple bits of information and others such as the comment system just isn’t documented.

Although they are quite upfront about the comment system needing documents, it is an area that slows down the production pipeline quite alot, to the point where its as slow going as any other development. I suppose I can’t complain too much but still I hope this gets addressed reasonably quickly. I should put down my own experiences with the comment system at this point for others to use, but it should be noted that I don’t know much at all and this is only my findings and what I have so far:

  1. The Django comment system is broken up into three areas - Comments, Karma and Freecomment and if you are interested in what these contain then looking at the database should be your first port of call.
  2. Free comments and comments are different though in some cases if you are using a template or method using free_ then you can sometimes safely omit free_ and get the standard comment system.
  3. The standard comment system is based around logged on users, while freecomments seems to be open to all.
  4. At the moment due to the lack of documentation the two best places to find out information is from the django source itself /django/contrib/comments and in the sourcecode posted by Jeff Croft for his Lost-Theories website.

Here you can see the django comments tables in MySQL (my host doesn’t yet support PostGreSQL, so I develop in the same database I am going to host on).

MySQL view of the comments system

So this has lead me to get a working but rough comments module into my test site. I am using a mixture of my own views and generics like most, and I have created my own templates for the tables in my model.

In the details page for one model, I am pulling out some information from the post like so:

{% block content %}
{{ object.article_body|escape|linebreaks }}
{% endblock %}

Then I am referring to the comments. My model is called Post so that is what I am pulling the comments out for:

{% block metacontent %}
{% load comments.comments %}
{% get_comment_list for website.post object.id as comment_list %}
{% ifequal post.get_comment_count 0 %}
No one has posted any comments yet. Perhaps you'd like to be the first?
{% endifequal %}
{% for comment in comment_list %}
{{ comment.comment }}
{% endfor %}

Then I pull in the standard comment form:

{% comment_form for website.post object.id%}

In your templates directory you can then create a subdirectory called “comments” and the commenting system will search in here first for the comments templates before using its own.

I copied the form.html template in here and modified it, and then I also created templates for posted.html and preview.html. If you are looking for ideas for these two again Jeff Croft’s source code for Lost-Theories is very helpful.

And this is as far as I have got so far. In the future I would love to extend it with the Karma system but there is alot more to do to get this site up and running.


-image-Dreamhost backup plans

I have been looking at how I backup my data at home, and one thing that always comes to mind is how to get these backups of site, and preferrably into a different geographical area easily.

Well Amazon S3 storage was always on my mind, but recently Dreamhost have gone crazy with their storage offerings.  I know have over 400Gb of space with over 4Tb of transfer for a small outlay each month.

A cost comparison has been done here by Joseph Scott showing how the two compare:
http://joseph.randomnetworks.com/archives/2006/10/03/amazon-s3-vs-dreamhost/

I am going to be looking at implementing something with Dreamhost I think, I am not a major corporation, I am a home user with some data so I think Dreamhost will be fine.

Bacula and Backuppc are two projects that run on Debian that I will be checking out, and first and foremost I want to make sure that my data is encrypted quite strongly.  Though I am probably going to put up my photo archive just as is, to have easy access when needed.  More posts to come on this.


-image-Is NetBSD in a bad way?

Well if this email from one of the founders and leaders of the NetBSD project and foundation it could be.

http://mail-index.netbsd.org/netbsd-users/2006/08/30/0016.html

From what he is saying is that participation in NetBSD is at an all time low, and contributors have no clear leader pushing development leading to stagnation in the project.

Its interesting stuff particularly if you want to know why this project is failing and others succeding, but at the end of the day it is what businesses know all along - one strong leader to push and fight is always better than a committee of joint responsibility, why else would major corporations around the world work like this.

It will be sad to see NetBSD disolve, the same way the Darwin project has gone, but I can’t help wonder if there is something bubbling under that can come and change the state of the marketplace.  Something non-BSD, non-unix, non-Posix based.  In other words something to challenge OSX, Linux, *Nix and Windows in the future.

I hope OpenBSD will prosper for sometime longer.


Bad Behavior has blocked 369 access attempts in the last 7 days.