in the maze.net

To content | To menu | To search

Thursday, December 18 2008

Tracking traffic statistics

I'm wondering... what are the pros and cons of these engines:

Feature-wise, Google Analytics is awesome. One of the drawback is that its hosted "outside".

I've been using AWStats for awhile. Its cute, but it is very limited in its tools to analyze data and has no tracking options.

Piwik is a new one to me. Seems pretty awesome, but it is also pretty young.

My all-time favorite engine is the one that came with a Website I once ran off GoDaddy - entirely proprietary, of course.

Anyone has experience to share with these (or others)?

Tuesday, November 18 2008

FeedWordPress RSS Title Filter for WordPress v1.0

Just made a little WordPress plugin for my newfound friends at RPBloggers.com.

The plugin tweaks FeedWordPress (a feed aggregator) to add the syndication source title to the post titles.

Checkout the official page: FeedWordPress RSS Title Filter for WordPress

Wednesday, October 22 2008

Updated to dotClear 2.0.2

Well, I've gone and updated the old blog to the sparkling new version of dotclear.

Great thing is that now all of my blogs are centralized. Sweet. Now I can post sparingly from one convenient location!

Other noteworthy fact: I've just released a DotClear 2 plugin for CommentLuv - check it out.

Tuesday, April 8 2008

IE7 And '

Well, I learned something today.

The XML entity "'" is not displayed properly under IE7. Instead of showing the single quote, as I would expect, it shows "'".

' works well under FireFox, IE6, IE5, Safari and Opera. But no longer under IE7.

The most understandable explanation I've found about this is that it is part of the XML standard and not HTML.

To which I would reply: yeah, but I'm doing XHTML.

To which I've read the insightful reply:

If you're doing XHTML, the world is not ready for you.

Another hilarious and insightful answer to the problem was :

Use ' instead of ' ?

So I'm resting from the shock and looking at my HTML transformation libraries wondering if there is a tsunami of problems that is waiting for me if I remove the conversion from single quote to the ' entity.

I really don't expect any troubles as we never used single quotes to delimit parameters within HTML and we never used the HTML transformation methods to send text to javascript.

Still, one wonders about the woodpeckers and civilization.

Maybe Microsoft will let out a patch?

LOL.

For once, it seems that it is MS that is sticking to the standards. Brave new world?

To clarify the standards:

&apos is not part of HTML: W3CCharacter entity references in HTML 4

But is a part of XHTML: W3C xhtml DTD entity set: Special characters

Here's a link to an entity test, devised by W3C.

The whole issue is also described in Wikipedia - Entities representing special characters in XHTML

Thursday, April 3 2008

limiting CPU usage of a task under Linux

I have a few tasks that I run at irregular intervals on some of my servers.

Some of them actually eat up quite a bit of CPU - something that I don't want on certain servers.

Running the task when the CPU is normally less used is nice, but I was looking for a way to start the task with a very low priority.

Basically, if anything else than that particular task wants the CPU, give it up. Otherwise, have a ball.

After a bit of search, what I found was the command called "nice". "renice" is also nice. Uhm... well.. its not "nice", but its nice.

Moving on.

Each task is given a "nice" level, which is the process' stat about how nice it is with other processes when it comes to sharing the CPU. The "nice" level is used by the kernel to determine who gets the CPU's attention.

Basically, the higher the level is, the more prone the task is to share CPU resources. The lower the level, the more selfish the process becomes.

The "nice" commands starts a process and assigns it a "nice" value, while "renice" allows you to change the "nice" value of an existing process.

For example, because I love examples, you could do the following weird backup command:

nice -n 20 zip -r /root/ugly_backup.zip /var/www/*

Which would start a low-priority (nice=20) task to recursively zip all of /var/www within the fule /root/ugly_backup.zip

(and people, please, don't backup this way if you haven't been forced to by someone with a gun or a big cheque)

NB: if you see your low-priority task run with a high CPU attribution, don't panic - it just means that no other tasks is asking for CPU. And your web server's CPU don't have to sit on its tiny metaphorical sillicon hands while waiting for your visitors to take a peak at your awesome, (hopefully) relevant, web page.

While I'm in the process of writing this reminder note for myself, I feel that it is nice to add, for the benefit of my memory, that by ending a command line with an ampersand symbol &, the task will be started in the background.

- page 1 of 10