Sunday, May 25, 2014

Third - Week

Mongodb basics
·        Insert Records :    db.collection.insert({id:1,name:”ABC”})
·        Find on specific details: db.collection.find()
·        Other: db.collection.count() , db.collection.drop()  etc..


Pyhton:
  While creating a file I started as “#! Python” which doesn’t work. 
  I then changed to “#!/usr/bin/env python” which is python installed absolute path.     

    Git Repository & Clone,Checkout,Build
g
1) git clone <git repository path><repository_name>
            eg : git clone git@hsenidmobile.com:/des-topup.git
2) Then go into the cloned directory and type
              git checkout <version tag>
Build a Scala project :
1) go into the modules directory and type ./sbt

Tuesday, May 13, 2014

Second Week

Shifting from Ubuntu to Fedora :
To insatll new softwares (2 ways): 
·         use "yum install <software_name>
·        Download tar file
1.     download tar.gz file from relevant site and extract to a folder
         eg: save tar.gz file to /home/user/install
                           
2.     open terminal, cd into the path where tar file resides and                           type “tar xvf <tarfile> to extract
3.     go to /home/user and type ls-a to check hidden files
4.     check there is a file called “.bash_profile” and then type “vi .bash_profile” to open it. Then set path to the file
                        eg: SOFTWARE_NAME_HOME=/home/user/install/software       



     The mysql commands are embedded by <<EOF EOF inside shellscript.
     Eg:
               #!/bin/bash
mysql -u root -p"" << EOF
use <dbname>;
DROP TABLE IF EXISTS <tablename>;
create table <tablename> ( <fields>);
describe <tablename>;
EOF