To get out of a frozen terminal due to ssh timeout. Type the following keys:
enter (return key) ~.
Add the following to your .ssh/config file. It sends a signal to the server every 240 seconds to keep the session.
Host *
ServerAliveInterval 240
Reference: http://www.metachunk.com/blog/dealing-osx-terminal-ssh-timeouts-0
Saturday, June 15, 2013
Monday, July 30, 2012
vim 7.x and matchit plugin
For a few months I have been trying to make my vim (7.2.330) in Ubuntu 10.04 work with matchit plugin. But it never wanted to cooperate. The matchit plugin works perfectly with my vim 6.4.6 by simply downloading/unzipping the match.zip from here and adding the following line to ~/.vimrc file.
:source {path_to_matchit_plugin}/matchit.vim
But for vim 7.x, the following line has be to added to ~/.vimrc as well:
:filetype plugin on
:source {path_to_matchit_plugin}/matchit.vim
But for vim 7.x, the following line has be to added to ~/.vimrc as well:
:filetype plugin on
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:
Any DNS changes you make can take up to 48 hours to reflect on the Internet.
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:
- Park the domain name you want to use with your Blogger account on our parked nameservers.
- 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.
- 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.
- Configure your Blogger account to use your domain name.
To Park Your Domain Name
- Log in to your Account Manager.
- Next to Domains, click Launch.
- Select the domain name you want to use with your Blogger account, and then from the Nameservers, select Set Nameservers.
- Select I want to park my domains.
- Click OK.
- Click OK again.
To Edit Your CNAME Record
- Log in to your Account Manager.
- Next to Domains, click Launch.
- From the Tools menu, select DNS Manager. The DNS Dashboard displays.
- For the domain name you want to use with your Blogger account, click Edit Zone. The Zone File Editor displays.
- In the CNAME (Alias) section, click the www record.
- In the Points To field, type ghs.google.com.
- Click Save Zone File, and then click OK.
To Forward Your Domain Name
- Go to support.google.com.
- Click Host my blog on a URL that I already own.
- Follow the listed instructions.
To Configure Your Blogger Account
- Log in to your Blogger account.
- From the Settings tab, select Publishing.
- Click Custom Domain.
- In the Buy a domain for your blog section, click Switch to advanced settings.
- In the Your Domain field, enter your domain name. For example, enter www.coolexample.com.
- 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.
- In the Word Verification field, enter the characters as they display in the image above the field.
- Click Save Settings.
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.
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
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.
'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.
Subscribe to:
Posts (Atom)