Saturday, 8 September 2012

Installing Groovy on Ubuntu 11.04

Well I had to re-install my computer, I lost all my data, I was so disappointed but then I thought what rifiki said in the Lion King "The past does hurt, but the way I see it you can either run from it or LEARN from it."

So, I thought I will install some bare minimum things I need in daily development and share all with you. Maybe some one gets some help and I feel happy :)

This is the fourth thing in my list.

1) Go to groovy wesite here.
2) Download the zip and the documentation as well (it does help).
3) Open a terminal by Applications > Accessories > Terminal
or Alt + F2 , then type gnome-terminal, press enter.
4) Unzip the folder, move it to some other location, I keep it in ~/softwares folder.
5) Add a new variable in .bashrc file
GROOVY_HOME=/home/nikhil/softwares/groovy-1.8.7
export GROOVY_HOME
PATH=$PATH:$GROOVY_HOME/bin
export PATH
6) Test it on a console, don't forget to open another terminal and type
     groovyConsole
7) Happy Testing Groovy Code.

Thanks . Keep Blogging !!!!
Installing JAVA 1.6 on Ubuntu 11.04 

Well I had to re-install my computer, I lost all my data, I was so disappointed but then I thought what rifiki said in the Lion King "The past does hurt, but the way I see it you can either run from it or LEARN from it."

So, I thought I will install some bare minimum things I need in daily development and share all with you. Maybe some one gets some help and I feel happy :)

This is the third thing on my to-do list. Please follow the following steps:

1) Open a terminal by Applications > Accessories > Terminal or Alt + F2 , then type gnome-terminal, press enter.
2) sudo add-apt-repository ppa:ferramroberto/java
[sudo] password for nikhil: my-password-here
3) sudo apt-get update
4) Then, install java jre:
 sudo apt-get install sun-java6-jre sun-java6-plugin
5) Install Jdk by the command:
 sudo apt-get install sun-java6-jdk

6) sudo apt-get install sun-java6-jdk
7) Now, setting the JAVA_HOME variable in .bashrc file 

JAVA_HOME=/usr/lib/jvm/java-6-sun (Don't give spaces between = and /usr)
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

8) Test it by javac -version
javac 1.6.0_26
9) Congratulations !!!











Install VIM editor on Ubuntu 11.04

Well I had to re-install my computer, I lost all my data, I was so disappointed but then I thought what rifiki said in the Lion King "The past does hurt, but the way I see it you can either run from it or LEARN from it."
So, I thought I will install some bare minimum things I need in daily development and share all with you. Maybe some one gets some help and I feel happy :)

Well, this is the second thing in my todo list. I really like the editor, too powerful and so light weight.

Just follow the steps:

1) Open a terminal by Applications > Accessories > Terminal
or Alt + F2 , then type gnome-terminal, press enter.
2) Type sudo apt-get install vim
3) [sudo] password for nikhil: my-password-here
4) Say 'y' to download the required packages.
5) If you get :
Setting up vim-runtime (2:7.3.035+hg~8fdc12103333-1ubuntu7) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.035+hg~8fdc12103333-1ubuntu7) ..

Congratulations !!
6) Test it with vim myfile
7) Escape out of it by : q
8) Search for a pattern /pattern

Thanks for reading. Keep Blooging

Install Skype In Ubuntu 11.04

Install Sype In Ubuntu 11.04

Well I had to re-install my computer, I lost all my data, I was so disappointed but then I thought what rifiki said in the Lion King "The past does hurt, but the way I see it you can either run from it or LEARN from it."

So, I thought I will install some bare minimum things I need in daily development and share all with you. Maybe some one gets some help and I feel happy :)

This is the first thing I would like to install, more to come .

1) Go to the skype website here.
2) Click on Get Skype and choose Linux.
3) Hovering on Download Now and select Ubuntu Distribution, Ubuntu 10.04 Skype will also work for 11.04 :)
4) New skype version 4.0 gets downloaded usually in Downloads folder.
5) Copy that to any convenient folder I have softwares folder under my home folder, I copy it there.
6) Open the terminal Application > Accessories > Terminal.
7) Go to the folder where you have the .deb file for me the file name is skype-ubuntu_4.0.0.8-1_i386.deb . For me the rest of the steps were :
8) cd softwares
9) chmod +x skype-ubuntu_4.0.0.8-1_i386.deb (This gives executable rights to the file).
10) sudo dpkg -i skype-ubuntu_4.0.0.8-1_i386.deb
11) Provide your password [sudo] password for nikhil: my-password
12) Press enter.
13) If successful, go to Step 21
14) If you got something like
 Processing triggers for python-support ...
Errors were encountered while processing:
15) sudo apt-get install -f
16) The following comes
 Correcting dependencies... Done
The following extra packages will be installed:
  appmenu-qt libaudio2 libdbusmenu-qt2 libmng1 libqt4-dbus libqt4-network libqt4-xml libqtcore4 libqtgui4
17) As you can see the -f option tries to correct the unmet dependencies you encountered at Step 14, press 'y' to install the dependencies.
18) If you get the following :
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Happy News :)
19) Now, try again sudo dpkg -i skype-ubuntu_4.0.0.8-1_i386.deb
20) If you get the following :
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for python-support ...
Congratulations !!!!!
21) Go to Applications > Internet > Skype > Agree the terms and enjoy.


* Please do not follow the procedure for ubuntu 11.10, if you already have then
  you may be getting an error similar to below ..

 dpkg: warning: 'ldconfig' not found in PATH or not executable.

 This is really bad but there is an alternative to fix this at here.


Thanks for reading.

Keep Blogging.

Monday, 30 January 2012

Git Remote Add


We can track multiple repositories from a single location in your local machine. Consider the steps

1) cd <my-fav-dir>
2) git init
3) git clone git@github.com:myOrg/myRepo.git
 Sets up to track the default branch of the repository just cloned with the alias origin, usually tracking master
4) Make sure by git remote show <repo_name>
origin 

Now, we want to track one more repo.
5) git remote add another_repo git@github.com:myOrg/anotherRepo.git

Now, create a local branch to track any branch in anotherRepo

6) git checkout -b anotherRepo_master another_repo/master

Now , you have made a new local branch named anotherRepo_master tracking anotherRepo's master branch and also switched to that branch.

To make sure everything is good do,

git remote -v

origin  git@github.com:myOrg/myRepo.git
another_repo  git@github.com:myOrg/anotherRepo.git

7) git add
8) git commit -a

Now, you want to push in the right repository, the syntax is

git push <repo-to-push> <local-branch-alias>:<remote-branch-to-push>

git push another_repo anotherRepo_master:master

Hope it helps.
Cheers.
Keep Blogging

Sunday, 29 January 2012

GIT PATCH FILE

Well , this is quick and dirty. Probably, I will add more information to it. But suppose consider the following:

Your manager says that he/she wants the digest of the commit you have just made before pushing the code to the repository. He/She will review it and tell more about it. You can probably zip your changed files and send him/her to review.

Git comes with a really nice alternate, the git patch files. To come up with it, just
do:

1) git add
2) git commit -a
3) git format-patch -1

-1 says that you want to create a patch file(containing all the git diffs) for the last commit.

-2 creates a patch file for 2 most recent commits and so on.

Now, he/she can just do

git apply <patch file path which you probably emailed>

That would create an exact same commit at his end and then she can see all the code that you have just written for a new critical feature/bug.
Please post any questions or updates.

Hope it helps.
Keep blogging
Cheers

Tuesday, 22 November 2011

Things I Like About Ubuntu

Recently I was asked this question why Ubuntu over Windows??

I think I did not justify my answer . I think I could have answered better .
Just some of the things that are coming to my mind , I can write it down.. I will update it further for sure as my understanding of the system grows..

1) Its free (god , we all like free things..)

STORY:
My friend recently bought a laptop for himself HP Intel Core I5(ahhh.. chuck the specs), etc.. The vendor told him the machine is worth 31k but you would need to add another 4k to install Windows 7..
My friend said thank you , I am a ubuntu lover , I will save my 4k for clubbing or better things in life..

2) I like to obey the law..(Well mostly same as above , but I can continue the story)

STORY:
Another friend of mine took the same machine in 31k but now he installed pirated windows .. Pirated office.. Pirated softwares.. And he left automatic updates ON.. [Big Mistake]
Now his OS keeps bugging (begging) him to update to the original version..

3) sudo apt-get install <anything>

Well this is the most loved command of any Ubuntu person.. It can install anything.. It just recently installed my Reliance 3G datacard..

sudo apt-get install  libqglviewer-qt3-2

Then just ./install.sh great..

4) Greater UI experience than windows .. Its a personal thing but well.. I believe 11.04 is killer , guess what they have 11.10

5) I can delete .IntelliJIdea10/ folder from my home location and it renews again for 30 days.. I just broke my point 2..

6) Aliases... Love creating them in my .bashrc
alias grapport8090='grails clean;grails -Dserver.port=8090 run-app'




7) get all the youtube content I ever see..

just cd to your home folder , then 

cd .cache/chromium/Default/Cache , you can find all the videos you are currently watching present with some odd name there.. Copy them to wherever you like and enjoy !!!

I will update it once I know more..
Till then keep blogging..