Category Archives: Networking

Some networking ventures , I took with my beloved pc and laptop

Google- paranoid about computer safety

😀

Well , another long vacation ends up here.

Googling, has now become a verb , meaning to search on Google. Google has recently added a new feature in which it also looks for malicious code on the websites while crawling and indexing them, and in case google found one, it will notify it in the search results that “This site may be harm your computer.”  you might have seen this message , but I guess, it appears in the search very rarely , only if the website contents have been compromised .

Well, well, I have been googling for the last 10 minutes and thats what I am getting in every search. (this is just one of them)

This site may harm your computer.Google search result displaying “This site may harm your computer.” for every result.

Something has gone wrong into the indexes datastore at google, or it might be the code interpreting the value for indication of harmful website, totally opposite of what it actually meant. 😀

Advertisements

Regular Expression : Escaping Meta Characters within character classes

Many of us have written applications where we have used regular expression for different tasks, like validation , parsing and other related task. Regular Experssion is quite a powerful tool, and has been available in most of the programming languages that are used today (either natively supported or by using libraries).

Usually in a regular expression ‘\’ is used as a the escape sequence (it may be different for different languages , I am using C# convention), to escape meta characters. Regular Expression also support a construct called ‘character classes’ ,which can be roughly taken as a set of characters. There are some pre-defined character classes like \d \w \s etc. and if you need a more customized version you can define your own using Square brackets notation ‘[]’.

The world inside the square brackets is much different than the one outside.  Inside the brackets , there are only two meta characters, ‘^’ and ‘-‘; even an opening bracket ‘[‘, asterisk ‘*’ , plus sign ‘+’ are not considered as meta inside []. Furthermore , [] has no escape sequence within them. Now what you will do if you want to have ‘^’ , ‘-‘  and ‘]’ inside a character class.

Well these characters are escaped using particular placement within brackets.

One key syntactic difference is that the backslash is NOT a metacharacter in a POSIX bracket expression. So in POSIX, the regular expression [\d] matches a \ or a d. To match a ], put it as the first character after the opening [ or the negating ^. To match a -, put it right before the closing ]. To match a ^, put it before the final literal – or the closing ]. Put together, []\d^-] matches ], \, d, ^ or -.

source :http://www.regular-expressions.info/posixbrackets.html

Problem Solved . 😀

By the way , this web site gives a good introduction about Regular Expressions.

regards

Faraz

Demonoid is back once again

Well after a long time, once again, Demonoid is back,  the user accounts are still there, and our upload /download statistics are still intact. enjoy !!

LPT0006 passed away ! – Obituary

Its really sad for me to break that my laptop ‘lpt0006’ has passed away on wednesday 8th January, 2008 at around 2:45 pm (local time). 😦 The exact cause of death is still unknown, but initial reports claim that it was due to hard disk controller failure. However I am still waiting for an official autopsy and hopes that it may be able to rise again :).

‘lpt0006’ was from the family of acer ferrari 4000 series ( ferrari 4005 WLMI). The departed soul had been in service since 26th March 2006 11:am and meticulously executed it duties during that period. During this period which spanned over 654 days, ‘lpt0006’ served 18-20 hours /day, while the disk I/O usage is estimated at 500 mb read writes /day ( this is only for user data and does not include paging and caching i/o). Awesome thorughput , I would say, from this family. But its sudden death was an extremely surprising incident.

Although I didn’t like the machine , but hey it was free and an above average performer, and didn’t cost me any thing 😀 .  I usually spend most of my after office time over my laptop, and suddenly after getting deprived of it, I had no other choice but to stare the roof while lying on my bed :).  ( I have already taken my xbox and complete Harry Potter books set back to Pakistan  while visiting during this winter vacation) . But the worst part isn’t over yet, the next three days were holiday , Thursday was off  due to 1st Muharram,  while Friday and Saturday are our usual off-days of the week.  So I had nothing to do , literally nothing , to do at home, except for sleeping 😀 .

Anyway , I used Dell Inspiron 8600 ,borrowed from Khurram bhai, for sometime, until I got a replacement laptop tablet notebook. Its LT-20 from LG, bundled with Windows XP Tablet PC edition. Its really cool to use it. It has a touchscreen and can be turned into a small notebook or tablet , by rotating and flipping the screen. Though machine is not so strong, apart from being bloated with support softwares( input panel, keyboard surrogate, bla bla) which consumes almost 80% of available physical memory (400 out of 512 megs, consumed after getting logged in to the system). Anyway its lighter to carry ,with 11″ screen. Helpful in taking notes, preparing documents, chatting, light browsing activities, but nothing more then that. :P.

I am planning  to buy a notebook for myself, after going through some reviews, I am finally settled for Dell XPS M1530  , cool han!  I am waiting for DSF promotions which will be starting from 24 th January 2008. Mean while , I will look into products from other vendors, most probably from Alienware ( Personally I don’t like HP pavillon, Lenovo thinkpad).

By the way, did I mention it was an obituary for the deceased one 🙂

regards

faraz

Demonoid is back

If you know what is Demonoid, then you might already knew that its back, hurayyyy!!. and by sheer factor of luck if you don’t have any idea what this would mean, then my sympathies are with you. :P.

Demonoid, is a site for sharing torrent files. It hosts a large no. of torrent files. Torrents are sort of links to actual files which are hosted on different peers all over the world. Bit Torrents is p2p technology for sharing large files. Users usually get a torrent file from servers like Demonoid, piratebay, meganova,torrentbox. These torrent files contain links to the tracker of the data file ( e.g movies, Linux distro etc). The actual downloads are not hosted on the servers and are dispersed over a no. of peers. Most of the time, torrent client is downloading different chunks from a large no. of peers. Trackers are used to collect statistic about a torrent i.e no of uploaders a.k.a seeders, and no of downloaders a.k.a leechers, and are very vital to the torrent network. Most of the torrents sites are usually available for free, you might required to create an account. However some requires paid subscription for accessing the listed torrents and only allows registered members to access the tracker. Some sites, although free, but require you maintain certain DL:UL ratio (usually at least 0.5), you may receive a warning if your ratio get too low. This is intended to promote a sharing community, because without sharing, torrent community will come to its knees. It is often recommended to upload at least the amount which you have downloaded.

So, what’s so cool about Demonoid. I think, it is the best torrent site, I have ever landed on. It is free if you want to access only latest uploaded torrent files, but to access the older files, you are required to be registered. Registration is also free, but opens only at some unannounced time during each month(usually start /end of month). Torrents are usually of good quality and categorized making them easy to locate.

Demonoid has been receiving law suits threat from the beginning, they moved their server from Germany to Canada ( afaik ) to avoid them. Last week they received another notice from CRIA. (Why these anti-piracy morons always come when something is hitting the big scene, where were they, when the technology was in its infancy, I am sure an intelligent investment at that time would not only benefited them but also they might have contributed something important to the computer industry.)Their website was down for few days, though the server was replying to ping messages. Now they are back. welcome back!!

regards

faraz

blog.farazmahmood.com

 

As I have previously mentioned that I am now a proud owner of farazmahmood.com domain. At the moment my domain is registered with yahoo, and www.farazmahmood.com is directed to http://s.faraz.mahmood.googlepages.com  as I am not in mood to buy a hosting solution , why , well  I don’t think I need one right now, and googlepages are doing their job fine. 

 In my previous post “some activities” I mentioned about creating a sub-domain blog.farazmahmood.com and pointing it towards my laptop, (it is functional only after my office hours i.e when I am at home ,usually 8pm-10 am ). I Installed wordpress on my laptop and configured it in IIS ( IIS ,PHP,mysql combo) , well it worked fine except for one little issue, i cannot host multiple domains on my machine with IIS , i have to use virtual directories to get through it . like http://blog.farazmahmood.com/blog to reach my blog and http://blog.farazmahmood.com/someotherstuf   to get someotherstuf , instead of http://someotherstuf.farazmahmood.com .

The main reason for the behavior is that my machine has win xp with IIS 5.1 installed. The desktop class OS has several limitations when it comes to server oriented task, one of which is that the IIS can not host multiple sites , though you can use virtual directories to do so, but you won’t be able to host multiple domains on the same machine. I wanted this to host multiple subdomains on my laptop ( this is known as virtual hosting).

So ..

I switched to Apache web server. Two days earlier I downloaded and installed the apache web server. Apache web server does not have such restrictions, and its quite popular on web for its performance and feature set. Apache also support virtual hosting,  plus a module based architecture , to extend the functionality  of the web server. Configurations are little bit difficult, but forums and help docs are quite helpful, though a UI configuration manager would be warmly welcome.

Anyways, i configured to host my subdomain http://blog.farazmahmood.com as a virtual host on apache. (I did some mistakes while configuring , i enabled virtual host include but did not updated the virtual host. This situation took half an hour to get resolved.) so now my local blog setup is http://blog.farazmahmood.com . I am intended to use this as a mirror for my original blog https://farazmahmood.wordpress.com . I will be adding few more web applications like forum, PHP nuke, wiki , etc .. so keep checking.

(working hours -weekdays:  8 pm -9 am ,  friday /saturday: full day ,  All times are acc to. UAE standard time 🙂 )

regards

faraz

some activities

ever since I got a domain for my self ,I have been trying different things to make most out of it. At the moment I have set up my googlepages and www.farazmahmood.com follow to my home page at Google page. There is nothing much there except a link back to this blog.

I have also set up a wordpress installation on my laptop. Though they claim that it takes merely five minutes to install the wordpress and running, but if you have done any previous installation of mysql and PHP, it might take long.(took me 3 hours).

I started with the download of PHP and mysql. MySql has a community edition, which comes with an installer for windows machines. There is also an extension for php, to enable accessing mysql APIs from php. MySql installation was a breeze , I also installed the UI for interacting with mysql. Then came the turn for Php.

It was I think my first encounter with Php. I didn’t have any idea how php works and how to install it and configure it with the web server. When I reached php website , I found that there are two branches of Php supported by the php team, one is version 4.xx.xx, and other is 5.xx.xx. that made me confuse. To me the difference between the two was not obvious. shouldn’t the 5.xx version is the latest one, then why still keeping 4.xx.xx . well I still don’t know the difference clearly. What I understand from different articles is that , version 5 introduces support of object oriented programming and has an improved core engine. ( please correct me if I am wrong). they are still supporting version 4 as many of the current php installation are using version 4 and version 5 introduces some breaking changes. Well wordpress says that they officially support version 4, but one can also install wordpress using version 5. So , I proceeded to download the latest version of 5.xx.xx series.

After downloading it , I executed the installer, which prompted me for opting how to configure the php with web server (IIS in my case) whether to run it as CGI application or ISAPI filter, later on it asked for installing extensions. I opted all and that was the worst thing in the installation, it enabled each and every extension and completed the installation. There were 103 extensions. and it took me 1-2 hours for hit and trying which to run and which not to, at the end it comes out only 2-3 extensions that were enabled. One important note , use MySql’s mysqllib.dll when enabling mysql extension, not the one supplied by the php installer.

well that’s done , my local blog was up and running. I also did few more things before installing the blog. We have a router in our home connecting our equipments to the Internet. I forwarded the port 80 on router to my laptop  (also enabled my laptop firewall to allow port 80), so that I can host my blog on my laptop, while others can access it easily via Internet. I also made a sub-domain , blog.farazmahmood.com, and directed it to the IP of my router. so you can access it via http://blog.farazmahmood.com/blog  :). This address may not be alive for the whole time ,specially when I am in Pakistan. but you might check it  from 9 PM – 9am ( uae time )

regards

faraz