Archive of articles classified as' "General"

Back home

Setting up central Mercurial server in Ubuntu

8/05/2011

Mercurial

It’s been a while since we’ve been thinking about moving to Mercurial from Subversion at our company. We were convinced about the benefits of DVCS and chose Mercurial over Git. However, due to pressure at work and some procrastination, the move was delayed a couple times. Finally, today we had the move and the team is already up to speed with it.

Although it’s quite simple to install it in a central server, the different articles on the web had me confused with too many options or with a different distro than Ubuntu. So, here is a dead simple list of things to do for installing Mercurial centrally for your dev team.

Read the rest of this article »

18 Comments

2011

7/01/2011

First, a very happy new year to everybody!!! The last year has showed me the ups and downs of life and I believe 2011 will be a great year. Some of my wishes in 2011 would be:

  • Re-shaping my company to become a major OSS based company in Bangladesh
  • Doing something meaningful for my country
  • Learning Ruby and related frameworks (Rails, Cucumber, etc)
  • Spending more time my family
  • Having more fun with my friends
  • Living a healthy life
1 Comment

Using Twitter for sending server downtime alert

25/03/2009

Today I’ve written this simple PHP script to alert me through Twitter whenever our company’s local server is down. The script is called by a cron every 5 mins in my central hosting. Without much babble, here goes the code (if you’re interested to know why I needed this, that’s at the bottom of the post):

[sourcecode language='php']

// Specify the target URL in your server
$targetUrl = 'http://YOUR_SERVER_URL';

// Specify what the response is from the server
$targetText = 'Hello from Daredevil';

// We will be using cURL for fetching the content
$ch = curl_init();

// Set the params
curl_setopt($ch, CURLOPT_URL, $targetUrl);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Get the response
$response = curl_exec($ch);
curl_close($ch);

// Are things in right place ?
if ($response == $targetText) {
die('Site is up and running!');
}

// Nope, so here are the sender's twitter info
$username = 'SENDER_TWITTER_USERNAME';
$password = 'SENDER_TWITTER_PASSWORD';

// Receiver's twitter username
$receiver = 'RECEIVER_TWITTER_USERNAME';

// Alert message to send
$message = 'Daredevil is not responding, please fix ASAP!';

// The Twitter API address (new direct message)
$url = 'http://twitter.com/direct_messages/new.json';

// We will be using cURL for this
$ch = curl_init();

// Set the params
curl_setopt($ch, CURLOPT_URL, "$url");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$receiver&text=$message");
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

// Send the request
$response = curl_exec($ch);
curl_close($ch);

// Success or failure
if (!empty($response)) {
echo 'Recipient has been notified.';
} else {
echo 'No response from twitter.';
}

[/sourcecode]

Why I needed this?

Recently we have setup a server at our office for committing work to a local SVN repository and have the QA test our work whenever they are ready. We also have a staging server where we do SVN update from this repo. Now, for the last few days, I’ve found the local server to be off due to a few reasons – but every time I realized this at night when I am back home and can’t do anything to turn it on. So I thought about this Twitter alert which is sent to my cell phone immediately when the server goes offline.

Btw, if Twitter doesn’t send SMS to your country, don’t worry. Check out the excellent service at Twe2 that I’ve been using for a couple days.

Cheers!

28 Comments

A Workshop on “Freelancing IT Jobs – How to Make Yourself Ready”

7/03/2009

Today I facilitated this workshop on Freelancing, organized by BDjobs.com. The primary focus of the workshop was to introduce the concept of freelancing to the attendee’s as well as to provide them with a general hands-on path on how to start freelancing. The total workshop covered a variety of sections starting from freelancing overview, freelance site reviews, tips on building a professional profile, the bidding process, tips on successful bidding, client management techniques, payment pitfalls, payment methods, etc.

You can download the presentation file here in two formats: PDF and Powerpoint.

The full workshop description is provided below. If you’re interested in attending the next workshop on April, get in touch with BDjobs.com.

Read the rest of this article »

3 Comments

Seven Things

20/02/2009

Well, this seven unknown things internet meme has been circulating in the web for a while and I am joining after seeing this in a few blogs I follow. However, haven’t seen this in my blogger network from Bangladesh so hope it will make a few laughs.

So here goes seven random (weird) things about me:

1. The veins in my left eyes are dried up, so I practically use my right eye for everything…pirate king!

2. The real break in my programming life came when I went to a programming contest with a team and was declined to participate. We had our rights and they later let us in, but gave us a almost broken PC. We cracked three out of 5 problems straight in DOS edit as the compiler would hardly run :)

3. I do not watch TV programs for the last 5 years. DVDs and downloaded movies/TV series are the only source of entertainment. My most fav TV series is The X Files.

4. When I was a kid, I was damn fond of toys. I had a whole collection of figures from HE-MAN, J.I.JOE, Thundercats, Transformers, and a few others.

5. I was present only in 48% classes in my second year in college, whereas the rule of thumb was a minimum of 85%. After the test exams, I was given a punishment of attending to library from 8am to 5pm for 26 days where the only thing allowed is study (textbook only). No friends, no gossip, no newspaper.

However, I convinced my father that this punishment was imposed to me as one teacher did not like my attitude in his class; i made my father to the principal with an application where its mentioned that I cannot attend this due to medical condition. Principal had to agree and I only had to do it for 2hrs for the sake of records ;)

6. The first program I wrote for money was a file copying & renaming program in VB6 for $20. It would transfer some old mail server (don’t rem the name) files from an old server to a new one and would rename their extension to match Microsoft Exchange. Exchange was smart enough to read & convert automatically, so it looked as if the program did the conversion. Heh heh.

The fun part is, later another company was somehow convinced that it’s a huge work and went into a partnership with me where I received a down payment of $1500 and a 30% profit sharing with the same application plus a few UI improvement. Not bad ;)

7. I never studied Computer Science nor did any programming classes. I have been in business studies concentration since school and did my bachelors in Business Administration (BBA). Currently I’m pursuing my masters in Business Administration (MBA) as well.

Here are the seven people I’m tagging:

1. Hasin Hayder
2. Anis Uddin Ahmad
3. NHM Tanveer Hossain Khan
4. Omi Azad
5. Trivuz
6. M.M.H Masud
7. Suhreed Sarkar

And here goes the rules:

- Link your original tagger(s), and list these rules on your blog.
- Share seven facts about yourself in the post – some random, some weird.
- Tag seven people at the end of your post by leaving their names and the links to their blogs.
- Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

Enjoy!

10 Comments