Posts

Showing posts from July, 2014

How to submit edited changes git review

Clone from git $ git clone https://github.com/openstack/cinder.git Cloning into 'cinder'... remote: Counting objects: 42771, done. remote: Compressing objects: 100% (38/38), done. remote: Total 42771 (delta 17), reused 4 (delta 0) Receiving objects: 100% (42771/42771), 20.94 MiB | 52.00 KiB/s, done. Resolving deltas: 100% (27315/27315), done. Checking connectivity... done. Go to cinder directory $  cd cinder Get the latest Patch Set $ git fetch https://review.openstack.org/openstack/cinder refs/changes/12/110312/4 && git checkout FETCH_HEAD * branch refs/changes/12/110312/4 -> FETCH_HEAD Note: checking out 'FETCH_HEAD'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by p

How to set git editor always as VIM

Please Just try $ git config --global core.editor "vim"

How to install and use vim editor in ubuntu

Just try this  $  sudo apt-get install vim $  vim <file name> Exit Commands :wq Write file to disk and quit the editor :q! Quit (no warning) :q Quit (a warning is printed if a modified file has not been saved) Opening a New File   Step 1 type vim filename (create a file named filename) Step 2 type i ( switch to insert mode) Step 3 enter text (enter your program) Step 4 hit Esc key (switch back to command mode) Step 5 type :wq (write file and exit vim) Editing the Existing File Step 1 type vim filename (edit the existing file named filename) Step 2 move around the file using h/j/k/l key or any appropriate command                                h Moves the cursor one character to the left                                l Moves the cursor one character to the right                                k Moves the cursor up one line                                j Moves th

How to remove unwanted files from git after git commit

Please go to directory and run this $ git rm /home/sanu/cinder/cinder/volume/drivers/emc/emc_vnx_cli.py After editing recommitte your work $ git commit -a --amend $ git review -v

How to display view count in Blogger

Image
                                       1) http://www.histats.com 2)Register 3)Login 4)Add a website 5)Click Website url 6)Click counter CODE 7)Click add new counter and select model                                                                            8)Copy standard content                          9)Click Layout option in Blogger and select gadget                                                                             10) select HTML/JavaScript                                                        11)past standard content from Histats into content

How to clone from github

Image
   Copy the HTTPS clone URL from github $ git clone https://github.com/openstack/glance.git

How to save output of git diff in local file

Image
you can get output result in local file with $ git diff > /home/sanu/myfile.diff

How to get output of all directery file error with single topy .py

Image
$ ./topy.py `find /home/sanu/horizon -type f -name "*.py" -exec echo {} \;` $ find /home/sanu/horizon -type f -name "*.py" -exec echo {} \; $ cat 'find /home/sanu/horizon -type f -name "*.py" -exec echo {} \;'

ImportError: No module named bs4

$ ./topy.py /home/sanu/horizon/horizon/views.py home/sanu/virt_env/virt1/local/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/sanu/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable). warnings.warn(msg, UserWarning) Traceback (most recent call last): File "./topy.py", line 24, in <module> from bs4 import BeautifulSoup ImportError: No module named bs4 $ easy_install beautifulsoup4 Searching for beautifulsoup4 Reading https://pypi.python.org/simple/beautifulsoup4/ Best match: beautifulsoup4 4.3.2 Downloading https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.3.2.tar.gz#md5=b8d157a204d56512a4cc196e53e7d8ee Processing beautifulsoup4-4.3.2.tar.gz Writing /

ImportError: No module named regex

$ ./topy.py /home/sanu/horizon/horizon/view.py Traceback (most recent call last): File "./topy.py", line 21, in <module> import regex ImportError: No module named regex $ sudo apt-get install python-dev [sudo] password for sanu: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libexpat1-dev libpython-dev libpython2.7-dev python2.7-dev The following NEW packages will be installed: libexpat1-dev libpython-dev libpython2.7-dev python-dev python2.7-dev 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 22.4 MB of archives. After this operation, 35.1 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/main libexpat1-dev amd64 2.1.0-4ubuntu1 [115 kB] Get:2

How to use virtual environment in ubuntu

$ sudo apt-get install python-setuptools Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: python-setuptools 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 230 kB of archives. After this operation, 830 kB of additional disk space will be used. Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/main python-setuptools all 3.3-1ubuntu1 [230 kB] Fetched 230 kB in 9s (25.2 kB/s) Selecting previously unselected package python-setuptools. (Reading database ... 225639 files and directories currently installed.) Preparing to unpack .../python-setuptools_3.3-1ubuntu1_all.deb ... Unpacking python-setuptools (3.3-1ubuntu1) ... Setting up python-setuptools (3.3-1ubuntu1) ... $ sudo easy_install virtualenv Searching for virtualenv Rea

git: 'review' is not a git command. See 'git --help'.

$ sanu@sanu-VirtualBox:~/ openstack-manuals$  git review -sgit: 'review' is not a git command. See 'git --help'.  Answer : $ sudo apt-get install git-review

git review -s WARNING: UNPROTECTED PRIVATE KEY FILE

Image
 git review -s WARNING: UNPROTECTED PRIVATE KEY FILE To fix this, you’ll need to reset the permissions back to default: sudo chmod 600 ~/.ssh/id_rsa sudo chmod 600 ~/.ssh/id_rsa.pub if you are getting another error: Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/home/geek/.ssh/known_hosts). This means that the permissions on that file are also set incorrectly, and can be adjusted with this: sudo chmod 644 ~/.ssh/known_hosts Finally, you may need to adjust the directory permissions as well: sudo chmod 755 ~/.ssh

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

Image
There is a wrong line (line number 1)  in /home/user/.ssh/known_hosts file. Please remove that line from  /home/user/.ssh/known_hosts file. then try ssh again you can use "vim known_hosts " text editor to edit that file like #vim /home/user/.ssh/known_hosts     then type ":1" to goto line 1 and  type "d" to delete that line. then save and close that file by typing ":wq"

How to access virtual host machine in normal terminal in ubuntu

Image
1)First install ssh in  host     $sudo apt-get install ssh   2)Add network adapter     3)Find inet address(inet addr:)     $ifconfig 4)Access remote location     $ ssh <username>@<inet address>             

How to copy data from one host to another host in linux virtual Operating system

1)First install ssh in both side of host     $sudo apt-get install ssh 2)Find inet address(eth 1 inet addr:) of host machines     $ifconfig 3)Copy data     $scp <filename> <username>@<eth 1 inet addr>:/home/sanu   

Download video from youtube using Ubuntu terminal

Copy and past this code into terminal $ sudo apt-get install youtube-dl Use the yotube-dl command followed by url $ youtube-dl url OR $  youtube-dl -t   'Get video url '

How to Install Google Chrome In ubuntu

Image
 

How To Contribute in openstack

Steps  1 : Create Launchpad account Launchpad account  2 : After launchpad account creation join        The OpenStack Foundation https://www.openstack.org/join/         (it's free and required for all  code contributors) 3 : Visit https://review.openstack.org/ and      click the Sign In link at the top-right corner of the page.      Log in with your Launchpad ID 4 : How to Generate an SSH Key   Go : my/settings/SSH Public Keys                                OR         https://review.openstack.org/#/settings/ssh-keys click " How to Generate an SSH Key " From the Terminal run ssh-keygen                OR         Go : /home/user  View Hidden folder           $ ls -a Go .ssh folder  View content of .ssh          $ ls    (only can see .  ..  known_hosts) Run         $ ssh-keygen -t rsa   (it will ask for key passphrase ignore that)                    if you want to know more about ssh key, read         http://en.wikiped