Getting experienced on Web Scraping

Tuesday February 23rdThoughts Category



My first scraping work was www.stock.projanmo.com where I have fetched and processed stock data from www.dsebd.org and www.biasl.net. I had to scrap them as they did not have any syndication feed. I had to process line by line. That was tedious job.

Later, I have worked with eBay product scraping for a few of my clients. In many cases, I did not need to take much trouble as they have web services. Whatever, that was most boring tasks as I am not good at Regular Expression. So, I have denied a lots of such tasks.

Recently, one of my old customer requested me to work again on scraping for collecting articles from www.articlesnatch.com and auto blog in wordpress. It also was comparatively easy as it has RSS feed for search page. But the RSS had summary of article. I had to fetch the whole article.

Yesterday, I have started a pretty big scrapping project. I also took helping hands to complete it fast. This time, I had to scrap articles from www.articlebase.com and autoblog in wordpress on some preselected schedules (wordpress’s native cron). As they don’t have any feed for search keyword/category, it is a bit complex comparing to previous one. However, as I already have gain some scraping experience, it was very easy for me. And most surprisingly, I am now getting interest on scraping :P .

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

“Reply to email…” most idiot feature of Facebook.com

Saturday February 20thGeneral, Thoughts Category



Few days ago Facebook.com introduces a new feature “Reply to this email….”. To me this is the most stupid type feature of Facebook. Usually I get two types of email, i. when someone comments in my photo ii. when someone replies in my status.

1. Comments in my photo

Facebook sends me the comment as email and I can read it right from inbox rather than visiting the facebook. So, facilitate the conversation, Facebook now allows us to reply the comment by simply replying this email. This is the template of email

Foisal commented on a photo of you:

“some member is missing….sorry…. ;o( ”

New Feature: Reply to this email to comment on this photo.

To see the comment thread, follow the link below:

LINK TO PHOTO (Removed for Privacy)

Thanks,
The Facebook Team

Isn’t it a nice feature? But how do I know which photo is this? Suppose, someone asked me place of the photo like:

“Nice shot, where it is?”

Can you now tell me how you can answer without visiting the site? I don’t know which image, s/he commented on. So, I can’t reply without visiting the site and seeing the photo.

Suggestion: They should include image name and description in the photo and a thumbnail of image.

2. Comments on my status

When someone comments on my status, I also receive an email alert (as per my mail preference). But again, I don’t know on which status s/he commented. This is the template:

Sajjad Hossain commented on your status:

“Allah shohay hok!”

New Feature: Reply to this email to comment on this status.

To see the comment thread, follow the link below:
http://www.facebook.com/n/?profile.php&v=feed&story_fbid=331657240232&id=1080340658&mid=1e8c50fG4064b0b2G1522f9bG36

Thanks,
The Facebook Team

I don’t know what was my actual status and can’t comment by simply replying email.

Suggestion: Facebook should include original status in email.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Sunset at St. Martin Island

Friday February 19thGeneral Category

I captured this just after the sun went out of sight.

Place: Saint Martin Island
Date: 4 February, 2010.

Thanks to my friend Shohag for accompanying me during this capture.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

How to install AES Crypt in linux to encrypt and decrypt your files

Thursday February 18thLinux, Tutorial Category

AES Crypt is a simple tool to encrypt end decrypt your files. You can do it without being expert in either linux and/or cryptography. If you are simply familiar with linux shell, you have more than enough knowledge to use AES Crypt.

AES Crypt is a file encryption software product available on several operating systems that uses the industry standard Advanced Encryption Standard (AES) to easily and securely encrypt files.

However, you might have needed root privilege if AES Crypt is not installed in your computer and you want to install it. The installation is also as easy as pie. Just look below:

Installation

Visit download page of AES Crypt and copy the download link of AES Crypt source code for linux.

SSH to your server as root and run the following commands:

wget http://www.aescrypt.com/cgi-bin/download?file=v3/aescrypt305_source.tar.gz

tar -zxf download?file=v3%2Faescrypt305_source.tar.gz

Read the rest of this post →

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Technical session on ‘Facebook Application Development’

Sunday February 14thGeneral, Open Source, Thoughts Category

Yesterday evening, I have participated in a technical session titled “Facebook Application Development” at BASIS SoftExpo 2010. The session was taken by legendary PHP engineer and founder of Leevio, an Social Networking RnD startup, Hasin Hayder.

During the session, the speaker has tried to elaborate the fundamental steps of facebook application development that will show the light to the novices those are interested about facebook application. He also showed ,step by step, a sample facebook application development process.

The whole session was entertaining and useful.

The presentation slide can be downloaded from his blog or directly by clicking here.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

cPanel’s biggest bug, login with root password

Monday February 8thcPanel Category

I don’t know whether it is a bug or a feature. However, as this is unexpected, undoubtedly it is bug.

The problem is that, when you try to login to cpanel’s domain owner interface (2082, 2083), if you provide a password that matches root password, it will give you root access even though you did not used root as username.

For example, you have a domain mydomain.com hosted using cpanel, also suppose the username and password is mydomain and xXx123XX respectively. If for some, the root password of this server is same as your password, you will get the root access unwillingly though you were trying to simply login to your control panel.

Yes, anyone can get root access using the combination of root and xXx123XX when desires so. But won’t you surprise when you get such privileges even without knowing? You don’t know that server’s root password and but mere matching of password will give you unlimited access to server.

I hope they will fix it soon.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

কেমন গেল আমার ২০০৯?

Tuesday December 29thGeneral Category

২০০৯ সালটা আমার জন্য মোটামুটি প্রায় সবদিকে থেকেই সৌভাগ্যের একটা বছর ছিল (আলহামদুলিল্লাহ)। কিছু কিছু বিচ্ছিন্ন ঘটনা ছাড়া এ বছরটি ছিল শুধুই প্রাপ্তির। আবার এ বছরেই ঘটে গেল জীবনের একটা বড় ট্রানজিশন। আমি ছাত্র জীবন শেষ করলাম। বড়ই সুখের জীবন হলেও গথবাঁধা নিরস পড়াশোনা করতে আর ভাল লাগছিল না। তাই এটি শেষ করতে পেরে কিছুটা স্বস্ত্বিতে আছি। কিন্তু শান্তিতে আছি একথা বলতে পারিনা। ৬-৭ বছরের একটা জীবনকে কয়েকমাসে ভুলতে পারছি না। পাবলিক বিশ্ববিদ্যালয়ে পড়ুয়া সবারই সম্ভবত এমনটি হয়!

২০০৯ সালের প্রথম দিক থেকেই আমি আর্থিকভাবে কিছুটা সাবলম্বী হতে শুরু করেছিলাম। আগে প্রায় প্রতিদিনই ভাবতাম আমার সাইটগুলো (বিশেষ করে প্রজন্ম) চালানোর খরচ তুলব কিভাবে। কিন্তু বছরের মাঝামাঝি’র দিকে এসে সেসব চিন্তা মাথা থেকে চলে গেল। তাছাড়া সে সময় সুমন (এডমিন) এর আর্থিক পৃষ্ঠপোষকতার প্রতিশ্রুতি পেয়ে নিজেকে অনেক হালকা মনে হয়েছে।

তাছাড়া ২০০৯ সালেই ছাত্রাবস্থায় একটি চাকুরিতে যোগ দেই। এটি ফুল টাইম অফসাইট জব ছিল যতদিন না পরীক্ষা শেষ হয়। মে থেকে অক্টোবর পর্যন্ত রাজশাহীতে বসেই কাজগুলো করতাম। প্রথম কয়েক মাসেই বেশির ভাগ কাজ আমি অটোমেটেড করে ফেলেছিলাম যার ফলে বছরের শেষের দিকে এসে আমাকে এ ব্লগ লিখতে হয়েছিল। এ ছয় মাসে সিস্টেম এডমিন বিশেষ করে সিপ্যানেল সার্ভার স্যুট সম্পর্কিত অনেক জিনিস শিখেছি যদিও শেখাটা ছিল উচিতের চেয়ে কম। আর এই দুই কারণে (অন্য কয়েকটি কারণও আছে বটে) বছর শেষের কিছুটা আগেই সিন্ধান্ত নিলাম ইস্তফা দেবার। নতুন বছরের ২য় কোয়ার্টারে নতুন করে কিছু ভাবব! ফ্রেব্রুয়ারী ১ থেকে ততটা সময় বেকার জীবনের স্বাদ গ্রহণ করতে চাই।

২০০৯ সালে পিএইচপি গ্রোগ্রামিং এ শেখার চেয়ে কাজ করেছি বেশি। তবে এটা ঠিক এ বছরই ডাইভারসড টাইপের কাজ করেছি যা আমার কনফিডেন্স লেভেল কে কিছুটা হলেও বাড়িয়েছে।
Read the rest of this post →

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

cPanel introduced DNS Zone editor for end user

Friday December 18thGeneral Category

Finally they did it. DNS zone editing was a long waited feature for cPanel. A big portion of their customers were looking for such feature for a quite long time.

Recently I need it so badly that I started learning Perl. However, I won’t need to make it anymore.

It currently allows creating/deleting A and CNAME records through its Simple DNS Zone Editor and A, CNAME, TXT records through its Advanced DNS Zone Editor. Though it does not support other record types however, no doubt, these are the most important.

Finally, I am so happy and thanking cPanel team personally for introducing this feature.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

My favorite movies that I watched in 2009

Friday December 18thGeneral, Thoughts Category

The fact is the I never seen so many movies earlier. However, I believe I watched a number of great movies in this year. I am trying to recall the name of most enjoying movies that I watched in 2009. The order of names do not have any significance.  Bold names indicate most favorite.

The Shawshank Redemption
Forrest Gump
The Green Mile
The Terminal
Philadelphia
Children of Men
The Pianist
120
300
Meet the sparatan (parody of 300)
2012
Harton Hears a Who (animated)
Ice Age (animated)
Harry Potter (animated)
WALL E (animated)
Ratatouille (animated)
Finding Nemo (animated)
Life is beautiful
A beautiful Mind
Defiance
Blood Diamond
Troy
Into the wild
City of Angels
The Reader
Australia
Miss Congeniality 1-2
Phone Booth
The Illusionist
Angels and Demons
The bridge on the river Kwai
Slumdog Millionaire
Braveheart
Eight Below
The Teeth
The Good, the Bad and the Ugly
Inglorious Basterds
Pink Panther
The Great Debaters
Freedom Writers
Changeling

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

I am going to be free again

Wednesday December 9thGeneral, My Life Category

I could not (or did not) write blog when I have joined Athena Software Associates Ltd. But today I am writing as double update. I have joined in Athena Software Associates Ltd. as System Administrator in last May. I had to manage a number of their servers mostly using cPanel and providing system level supports to the customers. I have enjoyed the work there as I have faced a lots of issues with cPanel and learned how to deal with them. Though I don’t have any plan to build my career as system administrator, I believe the gained experiences will help throughout my developer life.

In December, I have decided to resign from my position for a number of reason. The first and the biggest reason is my current physical problem for which I need quite long time full rest. Allah knows how much I can rest  indeed. Some other minor reasons are, I started believing that I am becoming lazy there as the workload is not high. I wish and able to take more workload. Low workload means low learning to me. Moreover, I would enjoy working in team specially under supervision of some experts that would help me gaining knowledge faster.

Yesterday I have submitted my resign letter. However, I have to serve until January 31, 2010 for shifting my duties to new incumbent.

This job was the first full time job for me.  The decision to resign was very tough one. I will miss the superb friendly environment of Athena Software Associates. I will miss all the colleagues of Athena.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Increased fees of Freelancer.com is no way inspiring…

Tuesday November 17thGeneral Category

Today, I got an email from freelancer.com (formerly getafreelancer.com shortly GAF), that they have reviewed the month fees for gold membership. Unfortunately, I rarely see revision comes with low costs ;) . No exception here. They increased the gold membership fee from $12/month to $20/month.

To me, this is tolerable, though. However, the most rubbish thing they applied that they will still charge per project from the gold members. The gold members has to pay 3% for each project. No way I can appreciate this.

Comparing other freelancing sites, their prices are still good. However, this is the cause we are here. Moreover, allmost all other freelancing sites provides payment guarantee. That means, when you are get paid, money is really yours. It is not true for GAF. They can’t provide such guarantee. I am the victim of such incidents.

Once, I have worked with a rapidleech stuff with a customer. The customer was happy with the service and provided a 10 of 10 ranking. However, after a few days, I see my account is balance is $40 lower. Reviewing the log, I see GAF reversed a $40 payment but they never cared informing me. So, contacting support I came to know that, the customer filed a charge back in PayPal. As PayPal charged GAF account, they charged my account accordingly. They also told me that they will update me about the dispute but never they did unless I again and again contacted them. One day, finally I came to know (after querying even this time) that PayPal fully credited the original buyer so they won’t return me the money.

This happened more than 6 months ago. However, I did not write about it. When, today, I got their mail about increased fee, it ignited me to write on it. I have good ratings in other freelancing sites but I planned to sticked here because of cheap charges and minimum $30 project values. I have seen buyers in RentACoder.com and scriptlances.com offers $5, $10 for some projects. That’s why I used not to bid there.

Moreover, I requested my personal customers to open projects in GAF. But I won’t do it again from now as it will cost me.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

How to unzip multiple archives quickly?

Thursday October 15thLinux, Tutorial, Web Hosting Category

If you have a lots of zips in your directory, you may be tired of unzipping them one by one. You should not do it manually. You can do it by a single command:

First time I have tried using:

unzip *.zip

However, it did not work. It gifted me error.

You can do it by any of the following methods:

Method One:

unzip ‘*.zip’

Method Two

for i in *.zip; do unzip $i; done

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

29th BCS Preliminary test results

Tuesday October 13thGeneral Category

The preliminary test results of 29th BCS were published today (Oct 13, 2009). Results are available on various site. However, you can search your roll number and get the result in www.forum.projanmo.com, world’s first Unicode complaint Bangla forum.

The authority of the site converted the published PDF based result to  allow to people search interactively. So, just visit and enter your roll number. You will get your result instantly.

Don’t forget to remove leading zeros while you enter your roll number.

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

পাসওয়ার্ড ছাড়াই শেল লগিন

Sunday September 13thLinux, Tutorial Category

যাদের বার বার এসএসএইচ এ লগিন করতে হয় প্রত্যেকবার পাসওয়ার্ড দেয়া তাদের জন্য বেশ বিরক্তিকর। তাছাড়া সেটা যদি রুট হয় তাহলে তো কথাই নাই। কারণ সাধারণত রুট পাসওয়ার্ড বড় ও কঠিন হয়। সেজন্যই এর বিকল্পটি ব্যবহার করতে পারতেন যাতে আপনাকে আর প্রত্যেকবার পাসওয়ার্ড দিতে না হয়।

প্রথমে আপনার কম্পিউটারে টার্মিনাল চালু করুন। যদি আপনি সার্ভারে রুট হিসেবে ঢুকতে চান, তাহলে আপনার কম্পিউটারেও রুটে পরিবর্তন করে নিন।

$ sudo -i

এখন রুট পাসওয়ার্ড দিলে আপনি রুট প্রম্পট পাবেন।

# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):

যেভাবে আছে এন্টার দিন।

Enter passphrase (empty for no passphrase):
Enter same passphrase again:

খালি রেখেই দুবার এন্টার দিন। এখানে পাসওয়ার্ড দিলে আপনাকে প্রত্যেকবারই লগিনের সময় আবার এই পাসওয়ার্‌ডটি দেয়া লাগবে।

Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:

দেখুন ‘পাবলিক কি’ কোন ফাইলে (এখানে id_rsa.pub) সেভ হয়েছে। ঐ ফাইলটি এখন আমাদেরকে সার্ভারে ট্রান্সফার করতে হবে।

# scp /root/.ssh/id_rsa.pub root@SERVER_IP:/root/.ssh/

SERVER_IP এর বদলে আপনার সার্ভারের আইপি বসান। এরপর পাসওয়ার্ড চাইবে। পাসওয়ার্ড দিন। ট্রান্সফার হয়ে গেলে এখন সার্ভারে আগের মতই লগিন করতে হবে। কিভাবে করতে হবে সেটা নিশ্চয়ই বলার দরকার নেই।

# ssh root@SERVER_IP

লগিন হওয়ার পর নিচের মত করে কমান্ড দিন।

# cd /root/.ssh/
# cat id_rsa.pub >> authorized_keys

ব্যাস! কাজ শেষ। এরপর লগ আউট করে আবার লগিন করলে আর পাসওয়ার্ড চাইবে না।

লক্ষণীয়:
১. ssh-keygen কমান্ডটি দুটো কি তৈরি করে। একটা পাবলিক এবং একটা প্রাইভেট। আমরা পাবলিকটি সার্ভারে আপলোড করেছি। কিন্তু প্রাইভেট কি আপনার কম্পিউটারেই আছে। এই প্রাইভেট কি যদি কেউ পেয়ে তাহলে সেও বিনা বাধায় আপনার সার্ভারে প্রবেশ করতে পারবে। সুতরাং এর নিরাপত্তা বিধান করা খুবই জরুরী।
২. authorized_keys এর পারমিশন সেট করুন এরকম:

# chmod 644 authorized_keys

যদিও শুরুতে বলেছিলাম বার বার পাসওয়ার্ড দেয়ার হাত থেকে রক্ষা পাওয়ার জন্য কিন্তু এটা সাধারণ অটোমোটেড কাজ করার ব্যবহার করা হয়। যেমন ধরুন একটা স্ক্রিপ্ট এর সাহায্যে আপনার ফাইলের ব্যাকআপ অন্য সার্ভারে রেগুলার আপলোড করবেন। সেক্ষেত্রে তো আপনার পাসওয়ার্ড দেয়ার সুযোগ থাকছে না।

৩. আপনি যে কোন সার্ভারে পাবলিক কি টা দেখানো পদ্ধতিতে রাখলেই সেখানে পাসওয়ার্ড ছাড়াই লগিন করতে পারবেন।

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

বাংলাদেশের সীমানা ছুঁয়ে…

Saturday September 5thGeneral, Travel Category

এর আগে একবার তিস্তা ব্যারেজ দেখে অদ্ভূত ভাল লেগেছিল! তখন থেকেই পরিকল্পনা ছিল সুযোগ পেলেই আবার আসব দেখতে! অফিসের কাজ, ইন্টার্ণশীপ এবং তার রিপোর্ট লেখা, ঈদের পর এমবিএ ফাইনাল সব মিলিয়ে গত সপ্তাহে একেবারে হাঁপিয়ে উঠেছিলাম! তখনই তুষারের সাথে কথা বলে ঠিক করলাম বৃহ:স্পতিবার আবার নীলফামারি যাব এবং যেহেতু এ সময় বিশাল বড় একটা চাঁদ পাওয়া যাবে, রাতে বেলায় তিস্তা ব্যারেজ দেখতে নিশ্চয়ই মজা হবে! তুষার রাজি হল! আমি অলজবসবিডি.কম এর এডমিন খোকন ভাইকে ফোন দিলাম তিনি কুড়িগ্রাম থেকে এসে আমাদের সাথে যোগ দিতে আগ্রহী কিনা! তিনি রাজি হলেন! আমি বৃহঃষ্পতিবার সকালে তিতুমির এক্সপ্রেসে রাজশাহী থেকে ট্রেনে উঠলাম নীলফামারির উদ্দেশ্যে! ১১টার দিকে খোকন ভাই মোটর সাইকেল নিয়ে কুড়িগ্রাম থেকে রওনা দিলেন নীলফামারির উদ্দেশ্যে! হঠাৎ মনে হল আমার তো পর্যাপ্ত টাকাই নেয়া হয়নি! তাই আমি সৈয়দপুর নেমে গেলাম! সেখানে ডিবিবিএল এর বুথ থেকে টাকা তুলে খোকন ভাইকে ফোন দিলাম! তিনি বললেন ৩০ মিনিটের মধ্যে তিনি সৈয়দপুর পৌঁছে যাবেন! আমি ভাবলাম তাহলে এখান থেকে একসাথেই যাব! আমি একটা রিকসা নিয়ে ঘুরলাম! প্রথমেই রেল কারখানায় গেলাম! গেটের গার্ড বলল (ঐ) লাল রুম থেকে আগে পারমিশন আনতে হবে! আমি সেখানে গিয়ে বললাম আমি রাজশাহী বিশ্ববিদ্যালয় থেকে এসেছি, আমি ভেতরে দেখতে চাই! তিনি বললেন আজকে তো অফিস ছুটি! শনিবার আসেন! আমি বললাম অনুমতির নাকি ব্যাপার আছে?

Read the rest of this post →

Bookmark: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Size

Colors