sudo chmod go-rw /var/lib/gems/
This command will give the permission only to current user.
Tuesday, July 20, 2010
Wednesday, July 14, 2010
GIT
1. While fetching a pull some time we get a error "can not merge due to local changes"
To get rid of this issue
=> git stash
=> git pull
=> got stash apply
2.if you are sure those changes got no value you can also: git reset --hard (that will remove the changes you have)
3. Just run the following command on the file or path you want to ignore the changes of:
4. http://www.sourcemage.org/Git_Guide
5. How to resolve the git merge :http://stackoverflow.com/questions/2073841/git-marking-files-as-resolved
To get rid of this issue
=> git stash
=> git pull
=> got stash apply
2.if you are sure those changes got no value you can also: git reset --hard (that will remove the changes you have)
3. Just run the following command on the file or path you want to ignore the changes of:
git update-index --assume-unchanged
If you wanna start tracking changes again run the following command:git update-index --no-assume-unchanged 4. http://www.sourcemage.org/Git_Guide
5. How to resolve the git merge :http://stackoverflow.com/questions/2073841/git-marking-files-as-resolved
Thursday, June 17, 2010
ROR Refrences
- Railscasts: Excellent free Rails screencasts
- PeepCode, Pragmatic.tv, EnvyCasts: Excellent commercial screencasters
- Rails Guides: Good topical and up-to-date Rails references. Rails Tutorial refers frequently to the Rails Guides for more in-depth treatment of specific topics.
- Rails blogs: Too many to list, but there are tons of good ones
Wednesday, June 16, 2010
what is RAKE
Rake is a build language, similar in purpose to make and ant. Like make and ant it's a Domain Specific Language, unlike those two it's an internal DSL programmed in the Ruby language.Rake is written in Ruby and heavily uses the language.
The basic idea of a domain specific language (DSL) is a computer language that's targeted to a particular kind of problem, rather than a general purpose language that's aimed at any kind of software problem.
namespace :kho do
desc "Hey"
task :sandeepa => [:clean, you can include multiple depedency ] do
puts "Hello world"
end
end
For detail please visit
http://martinfowler.com/articles/rake.html
The basic idea of a domain specific language (DSL) is a computer language that's targeted to a particular kind of problem, rather than a general purpose language that's aimed at any kind of software problem.
namespace :kho do
desc "Hey"
task :sandeepa => [:clean, you can include multiple depedency ] do
puts "Hello world"
end
end
For detail please visit
http://martinfowler.com/articles/rake.html
Tuesday, June 15, 2010
SOME USEFUL LINUX COMMANDS
Look at all the running ports and processes in ubuntu
sudo netstat -ltp
get a list of all packages installed in your ubuntu machine in a file
dpkg --get-selections > installed-software
On any new machine perform following commands
dpkg --set-selections < installed-software
apt-get -u dselect-upgrade
sudo netstat -ltp
get a list of all packages installed in your ubuntu machine in a file
dpkg --get-selections > installed-software
On any new machine perform following commands
dpkg --set-selections < installed-software
apt-get -u dselect-upgrade
Monday, June 14, 2010
How to install chrome in ubuntu
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. The Chromium codebase is the basis for Google’s Chrome browser.
First you need to edit the /etc/apt/sources.list file
sudo gedit /etc/apt/sources.list
Add one of the following
For ubuntu 9.10 (armic) Users add the following two lines
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
For ubuntu 9.04 (Jaunty) Users add the following two lines
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
For ubuntu 8.10 (Intrepid) Users add the following two lines
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main
Save and exit the file
Now add the GPG key using the following command
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5
Update the source list using the following command
sudo apt-get update
Install chromium using the following command
sudo apt-get install chromium-browser
Using Chromium
You can open chromium from Applications--->Internet--->Chromium Web Browser
First you need to edit the /etc/apt/sources.list file
sudo gedit /etc/apt/sources.list
Add one of the following
For ubuntu 9.10 (armic) Users add the following two lines
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
For ubuntu 9.04 (Jaunty) Users add the following two lines
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
For ubuntu 8.10 (Intrepid) Users add the following two lines
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main
Save and exit the file
Now add the GPG key using the following command
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5
Update the source list using the following command
sudo apt-get update
Install chromium using the following command
sudo apt-get install chromium-browser
Using Chromium
You can open chromium from Applications--->Internet--->Chromium Web Browser
Thursday, May 27, 2010
What is IP address
Every machine on the Internet has a unique identifying number, called an IP Address. A typical IP address looks like this:
* 216.27.61.137
To make it easier for us humans to remember, IP addresses are normally expressed in decimal format as a "dotted decimal number" like the one above. But computers communicate in binary form. Look at the same IP address in binary:
* 11011000.00011011.00111101.10001001
The four numbers in an IP address are called octets, because they each have eight positions when viewed in binary form. If you add all the positions together, you get 32, which is why IP addresses are considered 32-bit numbers. Since each of the eight positions can have two different states (1 or 0) the total number of possible combinations per octet is 28 or 256. So each octet can contain any value between 0 and 255. Combine the four octets and you get 232 or a possible 4,294,967,296 unique values!
Out of the almost 4.3 billion possible combinations, certain values are restricted from use as typical IP addresses. For example, the IP address 0.0.0.0 is reserved for the default network and the address 255.255.255.255 is used for broadcasts.
The octets serve a purpose other than simply separating the numbers. They are used to create classes of IP addresses that can be assigned to a particular business, government or other entity based on size and need. The octets are split into two sections: Net and Host. The Net section always contains the first octet. It is used to identify the network that a computer belongs to. Host (sometimes referred to as Node) identifies the actual computer on the network. The Host section always contains the last octet. There are five IP classes plus certain special addresses:
Every machine on the Internet has a unique identifying number, called an IP Address. A typical IP address looks like this:
* 216.27.61.137
To make it easier for us humans to remember, IP addresses are normally expressed in decimal format as a "dotted decimal number" like the one above. But computers communicate in binary form. Look at the same IP address in binary:
* 11011000.00011011.00111101.10001001
The four numbers in an IP address are called octets, because they each have eight positions when viewed in binary form. If you add all the positions together, you get 32, which is why IP addresses are considered 32-bit numbers. Since each of the eight positions can have two different states (1 or 0) the total number of possible combinations per octet is 28 or 256. So each octet can contain any value between 0 and 255. Combine the four octets and you get 232 or a possible 4,294,967,296 unique values!
Out of the almost 4.3 billion possible combinations, certain values are restricted from use as typical IP addresses. For example, the IP address 0.0.0.0 is reserved for the default network and the address 255.255.255.255 is used for broadcasts.
The octets serve a purpose other than simply separating the numbers. They are used to create classes of IP addresses that can be assigned to a particular business, government or other entity based on size and need. The octets are split into two sections: Net and Host. The Net section always contains the first octet. It is used to identify the network that a computer belongs to. Host (sometimes referred to as Node) identifies the actual computer on the network. The Host section always contains the last octet. There are five IP classes plus certain special addresses:
Subscribe to:
Posts (Atom)