Writings Photos Code Contact Resume Me
Coding and hacking

Extracting values from your apache log.

Submitted by msameer on Sun, 25/12/2005 - 12:06pm

Don't try to understand this, It'll lead to brain cancer ;-)

Just use it to extract things from your apache web server access log.

perl -n -e '/(.[^ ]*) -(.[^-]*)- \[(\d*)\/(\w*)\/(\d*):(\d*):(\d*):(\d*) (.[^\]]*)\] "(\w*) (.[^ ]*) .[^"]*" (\d*) (.[^ ]*) "(.[^"]*)" "(.[^"]*)"/; print "$1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 \n"' access.log


Drupal authentication backend for dokuwiki.

Submitted by msameer on Tue, 13/12/2005 - 12:41pm
This authentication backend'll enable your DokuWiki to authenticate using the drupal database.
This code is pulled from my svn which means that whenever I update it, It'll reflect the file displayed here ;-)
Or get the file directly from here.
Can't open the file!

katoob for windows 0.3.8+cvs20051212-win32-alpha

Submitted by msameer on Mon, 12/12/2005 - 11:03am

katoob-0.3.8+cvs20051212-win32-alpha.

This should be able to open and save files with Arabic filena


Katoob for windows needs your help.

Submitted by msameer on Fri, 09/12/2005 - 7:07pm

I've started the port a few months ago but it was inactive.

Last wednesday, Mostafa suggested that I port it to wndows.

So here's a deal, I've built a windows binary for the latest CVS.


The status block!

Submitted by msameer on Sat, 03/12/2005 - 5:34pm

That's the script.

You can run it using cron every hour or so, It should generate an HTML page like this.


Baghdad online demo.

Submitted by msameer on Wed, 30/11/2005 - 9:44pm

دلوقت ممكن تستخدم ال API بتاعة بغداد مع اى كود php

للتجربة

لسه الكود مش موجود فى اى حته غير عندى



UTF-32 <-> UTF-8 conversion code.

Submitted by msameer on Fri, 25/11/2005 - 4:36pm

Nothing is better than coding at night!
This was born at ~6 am.

This should also be integrated into Baghdad to drop the Glibmm dependency.


My projects section.

Submitted by msameer on Wed, 16/11/2005 - 9:35pm
I did it at last.

I aways wanted to create this section since I had foolab.

It's not exactly what I wanted it to be, But It's the best I can do at the moment.

I still need to populate it.

I've created the form using flexinode, Creaed the vocabolary hierarchy.
Overriding the node in my theme so I can display the tags like want.
Now how did I create the page itself ?
Here's the php code, It's not the best but it works:

<?php
echo "<br />";
$arr taxonomy_get_tree(5,0,-1,1);
$y count($arr);
for (
$x 0$x $y$x++)
{
$count 0;
$ch taxonomy_get_children($arr[$x]->tid5);
//print_r($ch);
$j count($ch);
$_ch = array();
for (
$i 0$i $j$i++)
{
$ch_a array_shift($ch);
$_url "/taxonomy/term/" $ch_a->tid;
$_count taxonomy_term_count_nodes($ch_a->tid);
$count += $_count;
$_name $ch_a->name " (" $_count ")";
$_ch[] = l($_name$_url);
}
$url "/taxonomy/term/" $arr[$x]->tid;
$name $arr[$x]->name " (" $count ")";
echo 
l($name$url);
echo 
theme_item_list($_ch);
echo 
"<br />";
}
?>

BTW: The code above'll be updated automatically whenever the original one changes.

Baghdad project - مشروع بغداد

Submitted by msameer on Wed, 09/11/2005 - 12:19pm

و بدا مشروع المدقق الاملائى الحر

pyduali did what I've implemented until now, But I've just started.

ديبيان ايتش ماعندهمش مشكله

ماندريك 10.1 هايبنوا حاجات كتير علشان يعرفوا يشغلوا بغداد

لا اعلم اى شىء عن باقى توزيعات جنو لينوكس

ويندوز ؟ هايحصل بس لسه شويتين ;-)