Friday, February 24, 2012

Mapping Your Domain Name to Work with Blogger

From GoDaddy support center: http://help.godaddy.com/article/5112#parking

You can establish a more professional identity for your Blogger® blog by configuring it to point to one of the domain names you registered through us. Instead of entering your Blogger URL to view your latest blog post, visitors enter your domain name's URL. For example, by mapping your coolexample.blogspot.com blog to your www.coolexample.com domain name, visitors focus solely on your domain name.
To point your Blogger blog to your domain name, you set up domain name mapping, which configures your blog settings and domain name. You update your settings in your Blogger account and our Domain Manager:
  1. Park the domain name you want to use with your Blogger account on our parked nameservers.
  2. Edit the www CNAME record for the domain name you want to use with your Blogger account. This update tells the Web browser to open your Blogger blog when visitors enter your domain name's URL in the browser address bar.
  3. Forward your domain name to use www. This step ensures your Blogger blog displays for visitors who go to your domain name with or without the www prefix. For example, it displays for visitors who entered both www.coolexample.com and coolexample.com.
  4. Configure your Blogger account to use your domain name.

To Park Your Domain Name

  1. Log in to your Account Manager.
  2. Next to Domains, click Launch.
  3. Select the domain name you want to use with your Blogger account, and then from the Nameservers, select Set Nameservers.
  4. Select I want to park my domains.
  5. Click OK.
  6. Click OK again.

To Edit Your CNAME Record

  1. Log in to your Account Manager.
  2. Next to Domains, click Launch.
  3. From the Tools menu, select DNS Manager. The DNS Dashboard displays.
  4. For the domain name you want to use with your Blogger account, click Edit Zone. The Zone File Editor displays.
  5. In the CNAME (Alias) section, click the www record.
  6. In the Points To field, type ghs.google.com.
  7. Click Save Zone File, and then click OK.

To Forward Your Domain Name

  1. Go to support.google.com.
  2. Click Host my blog on a URL that I already own.
  3. Follow the listed instructions.

To Configure Your Blogger Account

  1. Log in to your Blogger account.
  2. From the Settings tab, select Publishing.
  3. Click Custom Domain.
  4. In the Buy a domain for your blog section, click Switch to advanced settings.
  5. In the Your Domain field, enter your domain name. For example, enter www.coolexample.com.
  6. To specify another location in which to look for files, in the Use a missing files host? section, select Yes and enter the path. If not, select No.
  7. In the Word Verification field, enter the characters as they display in the image above the field.
  8. Click Save Settings.
Any DNS changes you make can take up to 48 hours to reflect on the Internet.
NOTE: As a courtesy, we provide information about how to use certain third-party products, but we do not endorse or directly support third-party products and we are not responsible for the functions or reliability of such products. Blogger® is a registered trademark of Google, Inc. All rights reserved.

Tuesday, January 17, 2012

Find a process and kill it in a script in Linux

ps -ef | grep process_name | awk '{ print $2; }'| xargs kill -9

Tuesday, April 19, 2011

Computer Science Terms

Algorithms: Are well-defined procedures for solving problems.

Data Structure: Is a particular way of storing and organizing data in a computer so that it can be used efficiently.

Dangling Pointers: Pointers that point to invalid addresses. Some examples of programming errors that can lead to dangling pointers include casting arbitrary integers to pointers, adjusting pointers beyond the bounds of arrays, and deallocating storage that one or more pointers still reference.

Thursday, March 10, 2011

Hash Table or Hash Map

In computer science, a hash table or hash map is a data structure that uses a hash function to map identifying values, known as keys (e.g., a person's name), to their associated values (e.g., their telephone number). Thus, a hash table implements an associative array. The hash function is used to transform the key into the index (the hash) of an array element (the slot or bucket) where the corresponding value is to be sought.

Ideally, the hash function should map each possible key to a unique slot index, but this ideal is rarely achievable in practice (unless the hash keys are fixed; i.e. new entries are never added to the table after creation). Most hash table designs assume that hash collisions—the situation where different keys happen to have the same hash value—are normal occurrences and must be accommodated in some way.

In a well-dimensioned hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table. Many hash table designs also allow arbitrary insertions and deletions of key-value pairs, at constant average (indeed, amortized[1]) cost per operation.[2][3]

In many situations, hash tables turn out to be more efficient than search trees or any other table lookup structure. For this reason, they are widely used in many kinds of computer software, particularly for associative arrays, database indexing, caches, and sets.

Credit for above paragraphs: http://en.wikipedia.org/wiki/Hash_table

Monday, November 22, 2010

Building thrift 0.5.0 on CentOS 5.3

You will need php 5.2 or above to successfully build thrift 0.5.0 or you will see the following error:

'zend_std_get_constructor' was not declared in this scope.

Download php 5.2.14 source from here and go through the usual "configure->make->sudo make install" cycle.

Friday, November 19, 2010

Display Chinese in Firefox on CentOS

1. sudo yum groupinstall chinese-support
2. Restart firefox

Thursday, November 4, 2010

Installing CentOS 4.4 using USB

Ok, I know this is an old version. But if for some reasons, your environment still calls for this kind of system.

1. Download the following from http://vault.centos.org/4.4/isos/i386
CentOS-4.4-i386-bin1of4.iso
CentOS-4.4-i386-bin2of4.iso
CentOS-4.4-i386-bin3of4.iso
CentOS-4.4-i386-bin4of4.iso


Windows

2. Use MagicDisc to mount the the ISOes to different drives. Open the the drives and copy all the files to a directory. Overwrite the files that have the same names.
Linux
2. Mount the iso
# mkdir /mnt/iso
# mount -o loop disk1.iso /mnt/iso
Copy all the files to a directory, e.g. centos44
# cp -r /mnt/iso/* centos44
Do the above for all the iso files.

3. Windows: Use MagicISO to write the files to an ISO; Linux:
# mkisofs -o centos44-i386.iso ./centos44

4. Use UNetbootin (http://unetbootin.sourceforge.net) to write the ISO to your USB drive

5. Boot from USB in your system that is to be installed. Select HTTP installation.
Site: vault.centos.org
Direcotry: 4.4/os/i386

The reason why we have to do this instead of using the CentOS-4.4.ServerCD-i386.iso file is that the
Server ISO does not match with the installation directory structure. The installation will not start.