Wednesday, July 31, 2013

All About GIT



GIT
Introduction:
[Phrase from man page of git] Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
Before you start with git you must know few terminologies regarding revision control system.
Revision Control Systems (in short)
Revision control system is a part of software configuration management. This manages project data such as documents, programs, releases with revision numbers, tags and branches. In practical, suppose you are a member of team of 20 people developing a product and as per each team members responsibility they keep writing their programs and documents, in that few programs and documents are shared and few are dependent. In this case it will be very difficult to keep a track of entire development process and there will be much likely cases in which developers may lose their codes or documents and many times they straight away fall in rework.
TBD….

Tuesday, July 2, 2013

Samsung S3 and Galaxy Grand I9082 short comparison


It seems that Galaxy Grand is good option in 17-18 thousand. Has good features in comparison with S3 but still S3 is more powerful in processing and has more internal memory plus 2 more sensors than galaxy grand.

In short, summary:

Features S3
Grand
GT-I9082
Remarks
Camera 8.0 megapixels back-side illuminated sensor
LED flash
HD video (1080p) at 30 frames/s
Aperture f/2.6
Autofocus
Zero shutter lag
Simultaneous HD video and image recording
Smile and face detection
Image stabilization[6][9]
8 MP 1080p
LED flash
Full HD Video Recording @ 30fps with auto-focus
Self-timer
Panorama
Smile Shot and Face detection
Stop motion
image stabilizer
Both are almost same
Camera Modes Single
Burst Mode
HDR
Smile Shot
Beauty
Panorama
Cartoon
Share Shot
Buddy Photo Share
Single
Smile Shot
HDR
Panorama
S3 is rich in camera click modes
Internal Memory 16 GB 8 GB more memory is good so you can store more data and install more apps. Usually with 8 GB internal memory sometimes adding more high end graphics apps slow down the performance 
RAM 1 GB 1 GB  
CPU  1.4 GHz quad-core Cortex-A9 1.2 GHz Cortex-A9 dual-core  
Screen Size 4.8 inches 5 inches  
Price 28000 - 27000 INR 17000 - 18000 INR  


If its feasible and possible for you in terms of budget then I’d suggest go for S3 J so at list for 2 years you don’t have to worry about new emerging technologies.





Tuesday, May 7, 2013

Daily used Linux/Unix commands



Command to list latest modified file from parent directory
ls –lRrta
Options:
-l for long listing
-R for recursive
-r for reverse listing
-t for sorting on modified time
-a for listing all including hidden files

Similar command on windows is: dir /N /S

Command to find a file from given path

find -name -print
e.g.
# find /etc -name "1000-gnu.java.security.provider.Gnu" -print
/etc/java/security/security.d/1000-gnu.java.security.provider.Gnu

Command to find a text by searching recursively entire directory contents
find -type f -print | xargs grep "text to search"
e.g.
# find DOWNLOADS/iotop-0.5/ -type f -print | xargs grep "import struct"
DOWNLOADS/iotop-0.5/build/lib/iotop/netlink.py:import struct
DOWNLOADS/iotop-0.5/build/lib/iotop/genetlink.py:import struct
DOWNLOADS/iotop-0.5/build/lib/iotop/data.py:import struct
DOWNLOADS/iotop-0.5/iotop/netlink.py:import struct
DOWNLOADS/iotop-0.5/iotop/genetlink.py:import struct
DOWNLOADS/iotop-0.5/iotop/data.py:import struct

Check directory existence recursively
find -type d -name "directory name to find" -print
e.g.
# find /exported -type d -name "iotop" -print
/exported/DOWNLOADS/iotop-0.5/build/lib/iotop
/exported/DOWNLOADS/iotop-0.5/iotop
 

Difference between grep, egrep and fgrep
gerp Search a Pa tern from current directory.

egrep (grep -E in linux) is extended grep where additional regular expression metacharacters have been added like +, ?, | and ().

fgrep (grep -F in linux) is fixed or fast grep and behaves as grep but does not recognise any regular expression metacharacters as being special.

Thursday, December 20, 2012

Upgrading JAVA in RedHat Linux 64 bit platform

1.      Download the binary
wget http://download.oracle.com/otn-pub/java/jdk/6u38-b05/jre-6u38-linux-x64.bin

2.      Run the binary via SHELL to install it.
chmod +x jre-6u38-linux-x64.bin
./jre-6u38-linux-x64.bin

This will create a directory of name 'jre1.6.0_38' Move this directory to /usr/java

3.      Verify the installation
cd /usr/java/jre1.6.0_38/
./java -version
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)

4.      Configure the new upgraded java environment
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.6.0_38/bin/java 1
'1' indicates the priority
/usr/sbin/alternatives --config java
There are 3 programs which provide 'java'.
Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2           /usr/java/jre1.6.0_38/bin/java
Enter to keep the current selection[+], or type selection number: 2

5.      Verify the environment
java -version
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)

Tuesday, November 6, 2012

apache-tomcat configuration on linux

Simple steps to configure apache-tomcat server

  1. Download apache-tomcat binary tarball from http://tomcat.apache.org/
  2. Copy the tarball to a specified location where you want to keep these tomcat installable. In my case   /opt or /usr/rakesh
  3. Untar the tarball and rename it as apache-tomcat 
# tar -xvzf apache-tomcat-7.0.32.tar.gz
# mv apache-tomcat-7.0.32 apache-tomcat
  1. Open server.xml
# vim apache-tomcat/conf/server.xml
edit line   
# if you wish to keep default port then keep the same else change it to any like
  1. Open startup.sh and add JRE_HOME path
# vim apache-tomcat/bin/startup.sh
add following line (set JRE_HOME/JAVA_HOME paths) :
export JRE_HOME=
  1. Execute startup.sh to start tomcat server
apache-tomcat/bin/startup.sh
This command will produce following output
 Using CATALINA_BASE:   /opt/apache-tomcat
 Using CATALINA_HOME:   /opt/apache-tomcat
 Using CATALINA_TMPDIR: /opt/apache-tomcat/temp
 Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
 Using CLASSPATH:       /opt/apache-tomcat/bin/bootstrap.jar:/opt/apache-tomcat/bin/tomcat-juli.jar   
  1. Open a web browser and type your host's fully qualified domain name and a port number:
OR
http://localhost:8880
This will open the tomcat welcome page.