Are you looking for my non-technical blog?

This is now my technical-only blog, my non-technical blog is here.
Showing posts with label Technology. Show all posts
Showing posts with label Technology. Show all posts

28 January 2006

P2P Web Hosting

I have an idea fo creating a P2P network - like Gnutella, eDonkey2000, or FastTrack - to be used for hosting web pages. This can minimize the cost of getting a dedicated server and domain names. A web site is a group of files (HTML, PHP, images, etc) having the same ID (protocol://site-name.com). A person can initially have thes pages on his PC and allow them to be shared by the P2P Client/Server when someone requests a page from that site the page is downloaded from the initial host, and cached on the requesters machine as well. Further requesters can retrieve the pages from any of them. The more popular the site is the more hosts it is cached on. This may also help in thecase of free-riders. One problem here is generating the site-names as they must be unique across the whole network, but I think that some distributed Naming Service Data Base can help.

*** Added on 28 January, 6:44 PM ***
It came out that there is such thing already, see Freenet Project
http://freenet.sourceforge.net/

Tags: , ,

07 January 2006

Writing Arabic on Ubuntu

بسم الله الرحمن الرحيم
To write Arabic on Ubuntu, first make sure that you have Arabic Language Pack (use Synaptic Package Manager to find "language-pack-ar", and "language-pack-ar-base") I also have "ttf-arabeyes" and "libfribidi0" installed here. By the way there is a package called "language-support-ar" that I think it includes all of the above stuff. Then go to System->Preferences->Keyboard and from the "Layouts" tab add the "Arabi/qwerty" layout. Now right click on an empty area in the "Panel" (The bar at the bottom of your screen) and choose "Add to Pannel" and add the "Keyboard Indicator" and here you go.

Tags: , ,

PyFusker

Python implementation of Fusker Introduction: Most probably you are redirected from Wikipedia to this page, so please if you have any comment on the code just leave it here so that I can improve it. Also if you can help me know why are people interested in the fusker technology that much, and what web sites do you usually fusker.
The Python Code
#!/usr/bin/python
""" PyFusker """
""" Author: Tarek Amr """
""" Version: 0.1 """
""" File: pyfusker.py """
""" Date: 07 January 2006 """
""" Replce [TAB] with \t """
class Fusker:
[TAB]def __init__(self, url):
[TAB][TAB]self.url = url
[TAB][TAB]self.urls = []
[TAB][TAB]self._generate()
[TAB]def _generate(self):
[TAB][TAB]comp = re.compile("\\[.+\\]")
[TAB][TAB]x = comp.findall(self.url)
[TAB][TAB]if not x:
[TAB][TAB][TAB]print "Url parsing error!"
[TAB][TAB][TAB]sys.exit()
[TAB][TAB]try:
[TAB][TAB][TAB]x[0] = x[0].strip("[")
[TAB][TAB][TAB]x[0] = x[0].strip("]")
[TAB][TAB][TAB]x1,x2 = x[0].split("-")
[TAB][TAB][TAB]x1 = string.atoi(x1)
[TAB][TAB][TAB]x2 = string.atoi(x2)
[TAB][TAB]except:
[TAB][TAB][TAB]print "Url parsing error!"
[TAB][TAB][TAB]sys.exit()
[TAB][TAB]if x1 > x2:
[TAB][TAB][TAB]print "Invalid range"
[TAB][TAB][TAB]sys.exit()
[TAB][TAB]temp_url = comp.split(url)
[TAB][TAB]i = x1
[TAB][TAB]while i < x2 :
[TAB][TAB][TAB]self.urls.append(string.join(temp_url,"%s" % i))
[TAB][TAB][TAB]i = i + 1
[TAB][TAB]return self.urls
[TAB]def list_urls(self):
[TAB][TAB]print self.urls
[TAB]def download_urls(self):
[TAB][TAB]for u in self.urls:
[TAB][TAB][TAB]try:
[TAB][TAB][TAB][TAB]print "Downloading ... ", u
[TAB][TAB][TAB][TAB]os.system("wget %s" % u)
[TAB][TAB][TAB]except:
[TAB][TAB][TAB][TAB]print "Wget Error!"
[TAB][TAB][TAB][TAB]continue
if __name__ == "__main__":
[TAB]try:
[TAB][TAB]url = sys.argv[1]
[TAB]except:
[TAB][TAB]print "Usage: python fusker.py http://www.website.com/img[01-06].jpg"
[TAB][TAB]sys.exit()
[TAB]f = Fusker(url)
[TAB]f.download_urls()
Tags: , ,

11 December 2005

Do You Spleak English?

Spleak is a virtual buddy that you can add to your MSN messenger (spleak@hotmail.com). After adding her to your MSN contacts, She can manage your time, take notes, do spell checks for you or alert you of deadlines and events. She also knows whole dictionaries, and encyclopedias by heart, and offers a variety of fun activities as well.
But it's really fishy that she does all of this for free! I think there is some hidden agenda out there. May be they have some plans to charge people for such services. Or may be they collect some date about people's behavior etc.
Spleak: http://www.spleak.com/

Tags: , , , ,

30 September 2005

Homepages Are Dead, Long Live The Blogs *

Not a very long time ago, people used to have their own homepages on geocities.com, tripod.com, etc., and there they used to publish some info about themselves, their own photos, or some articles they write. But these pages were rarely updated as you have to edit - you had to know HTML - the entire page in order to add a new article or photo there. So, now more people are moving from the Homepage phenomenon to the Blog one, since it is much easier to add a new post to your blog everyday with no need to edit the entire page - just some clicks here and there - even if you don't know HTML at all. This is what made blogs more like a personal free newspaper where you can publish whatever articles you want to your online readers. I myself haven't updated my homepage since one year or so, and on the other hand I have published more than one hundred blogs during that year.

However homepages still excels the blogs in their organization, they can be organized by links and menus and not by date like blogs, and that's why it is still used in professional fields like companies sites, and online news sites, etc as information can be sorted by categories and organized in different menus. But will this continue to be true in the near future? O.K. Google's point of view is "Why sort your stuff, where you can search for them", and you may notice this in your Gmail account, where you cannot organize your mails into folders as you can just leave them as they are, and then search for the mail you want any time. And that's why I think that the lack of organization of the blogs will not be a problem anymore as long as they are searchable and indexed by searching engines. I also expect the blog hosting sites to have search plugins on the near future to be added to the blogs there. Finally, will there be someday where there will be "http://microsoft.blogspot.com", "cnn.blogspot.com", and "otlob.blogspot.com"!?

* The title of this article is inspired by Gartner's article; "Intrusion Detection Is Dead, Long Live The Intrusion Prevention"

Tags: , , , ,

16 August 2005

If you're not listening, tell me to turn off the radio

I've noticed lately that there are many Egyptians who have their own bloggers. It looks like some kind of hype or "hey people, I am here !!". These blogs can be categorized as follows:

A huge number of them are political ones and they talk mainly - may be only - about "kefaya" movement and the re-election of Mubarak, etc.

Another major part is what I call "Egyptian Popular Art" blogs which publish poems for "Salah Jaheen", "Ahmad Fouad Nejm", etc and talk about concerts in the "Sawi Cultural Wheel".

After that there are the personal ones where people write their thoughts and may be their daily life.

Finally there are religious ones.

There are some points that I've noticed in this, one of them is that the religious blogs are very few compared to the presence of the religion in the daily talk of people in the streets. Also there are no - or at least very few - technical - ones that talk about new technologies, open source projects, etc. - nor scientific blogs as far as I know, which is expected but very disappointing.

At last, the question now compared to the number of these blogs and their owners, how many one reads them and is this number significant or it is like the Arabic pop singers phenomenon where singers are much more than their listeners.

11 July 2005

Linux USB to Serial to Console NetScreen Firewall

I have Linux installed on my laptop, and the laptop does not have serial port that's why I am using a usb2serial in order to console any external devices. So here is the configuration I done on my Ubuntu linux 5.04 in order to console NetScreen firewall (this can be used with many other devices as well).

First of all I installed minicom then configured it as follows:
Ctrl+A then press Z then O, then choose "Serial port setup", then press A and configure " Serial Device : /dev/ttyUSB0" then press enter and press E and configure "Bps/Par/Bits: 9600 8N1" then press enter and save setup as default and exit and here we go.

Tags: , , ,