Friday, July 5, 2013

Do you really need to migrate SVN to Git ?

Git is not better or worse, it's just different. SVN is simple and easy to learn. Git is fast but complex.


Git is a distributed version control and source code management (SCM) system .Initially designed and developed by Linus Torvalds for Linux kernel development.Torvalds has quipped about the name git, which is British English slang roughly equivalent to "unpleasant person". Torvalds said: "I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'.The man page describes git as "the stupid content tracker".

In 2002, the Linux kernel project began using a proprietary DVCS system called BitKeeper.In 2005, the relationship between the community that developed the Linux kernel and the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool based on some of the lessons they learned while using BitKeeper. Some of the goals of the new system were as follows:

  • Speed
  • Simple design
  • Strong support for non-linear development (thousands of parallel branches)
  • Fully distributed
  • Able to handle large projects like the Linux kernel efficiently (speed and data size)
The development of Git began on 3 April 2005 and Torvalds achieved his performance goals on 29 April.

Git is a distributed version control system. So what does “distributed” or "decentralized" actually mean?  Your local copy is a repository,This means that you can do commits, diffs, logs, branches, merges, file annotation and more – entirely offline, off VPN and generally instantly.
This looks good at first, but just keep in mind the added complexity to this approach. SVN has the advantage that it's MUCH simpler to learn.

Git has the advantage that it's MUCH better suited if some developers are not always connected to the master repository. Also, it's much faster than SVN. And from what I hear, branching and merging support is a lot better.Git is perfectly suited for Open Source projects: Just Fork it, commit your changes to your own Fork, and then ask the original project maintainer to pull your changes. With Git, this just works. Really, try it on Github.

Anyway Git is not better or worse, it's just different. SVN is simple and easy to lean.

Wednesday, May 8, 2013

Streaming log or Tail log using Notepad++

Notepad++ has the feature to update the file/log silently like "tail -f" in linux.

1. Select the Setting -> Preferences..



2. In the MISC tap select "Update silently" and "Scroll to the last line after update" option under "File Status Auto-Detection" part.


Other Alternative windows applications



Monday, May 6, 2013

Adjust LCD brightness in ubuntu in command line

1. Find the brightness range for your laptop

cat /sys/class/backlight/intel_backlight/brightness 

2. Set the brightness value

echo 1000 |sudo tee /sys/class/backlight/intel_backlight/brightness 

Thursday, May 2, 2013

Install oracle JDK in Ubuntu


Oracle retired the Operating System Distributor's License for Java, meaning that Canonical could no longer include the JDK or JRE in their APT repositories. This means no more "sudo apt-get install sun-java-whatever"

New Ubuntu installation comes with an open source implementation of Java SE installed, called OpenJDK (Open Java Development Kit), which is not compatible with applications written in Oracle Java.

Following are the steps to install Oracle JDK into Ubuntu

1. Download JDK package in http://www.oracle.com/technetwork/java/javase/downloads/index.html


for Linux x86 (32-bit) : jdk-7u21-linux-i586.tar.gz
for Linux (64-bit) : jdk-7u21-linux-x64.tar.gz

2. Extract the package

tar -xf jdk-7u21-linux-i586.tar.gz

This will extract and create a jdk folder at your current path.

3. Create a location to keep your new JDK . I prefer and usually use /usr/lib/jvm/
You may need root permission to create the /usr/lib/jvm (hence use sudo).

sudo mkdir /usr/lib/jvm

4. Move the extracted jdk folder to /usr/lib/jvm/

sudo mv jdk1.7.0_21 /usr/lib/jvm/

5. Now we have to setup our system to use refer to our new jdk

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_21/bin/java" 1 

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_21/bin/javac" 1 


sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_21/bin/javaws" 1


6. JAVA_HOME environment variable

vi /etc/bash.bashrc

 then add following line in endof the file

JAVA_HOME=/usr/lib/jvm/jdk1.7.0_21
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH


7 . All done.
When you reboot, try running the following:

$ echo $JAVA_HOME
/usr/lib/jvm/jdk1.7.0_21
 echo $PATH
usr/lib/jvm/jdk1.7.0_21 /bin



Thursday, April 25, 2013

Install Ubuntu in VirtualBox

1.Download and install oracle virtual box 
https://www.virtualbox.org/wiki/Downloads

2. Download ubuntu iso from ubuntu website 
http://www.ubuntu.com/download/desktop

3. Open Oracle virtual box and click "New"

4. Select the memory size 

5. Select the " Create a virtual hard drive now" option


6. Select Hard drive file type


7. Select "Dynamically allocated" option for storage 

8. Select the virtual disk size


9. Double click the newly created "ubuntu" label in left side


10. Select the folder icon as show below


11. Select the downloaded Ubuntu iso file


 12. Click start button as below 


 13. Install the Ubuntu 






Thursday, January 13, 2011

How to move Distribution database to a different location (MSSQL 2005/2008)

-->
1. Preparation
a. Stop Log Reader Agent


b. Stop Distribution Agent




c. Backup Distribution database
2. Check Distribution database Status
SELECT name, physical_name
FROM sys.master_files
where database_id = db_id('distribution')
3. Modify Distribution database files location
Alter database distribution modify file (name = distribution, filename = ‘New Location\distribution.MDF')
Alter database distribution modify file (name = distribution_log, filename = 'New Location \distribution.LDF')
4. Stop SQL SERVER service (NOTE: SQL AGENT SERVICE WILL STOP TOO)
5. Move old Distribution database files to NEW Location
a. MDF file
b. LDF file
6. Start SQL SERVER service
7. Start SQL AGENT service
8. Check Distribution database Status
SELECT name, physical_name
FROM sys.master_files
where database_id = db_id('distribution')
9. Start Distribution Agent service
10. Start Log Reader Agent service
Note:Make sure sql service agent has permission to access the new location