Ubuntu tips: Add a PPA and update only that one

If you use ubuntu, you most probably have added some ppa-s in your system.
The problem is you have to update all the software sources after adding a ppa by `apt-get update` which is time consuming if you have a lot of software sources.

Y PPA Manager helps to cut down the process. You can only update that ppa easily with Y PPA Manager.

To show you how easy it is you need to execute command



sudo update-ppa ppa:videolan/stable-daily

This will add (if you haven’t already added the ppa) and update the ppa for you.

    To install Y PPA Manager:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager #for the last time
sudo apt-get update #for the last time
sudo apt-get install y-ppa-manager

How to Solve Netbeans Error “No tracked remote branch specified for local branch-name”

Short answer:
As of Git 1.7.0:
git branch --set-upstream foo upstream/foo

Long Answer:
Netbeans 7.3 introduce three new feature for git remote

  • Fetch from Upstream
  • Pull From Upstream
  • Push to Upstream

But whenever I tried to use this commands, it gave me the error
“No tracked remote branch specified for local branch-name”

After digging around for a while, I found the solution.
git branch --set-upstream branch-name remote-name/remote-branch-name

Thanks to this so answer: http://stackoverflow.com/a/2286030/472538

Now set up keyboard shortcuts for the commands and also for commit and increase your productivity 😀

How to open a process as daemon on Linux

Sometime we may need to open a process as daemon (the process should not die when the child process die). One of the easiest way to do that is to run the process from command line and add a & at the example. For example if you want Firefox to run from shell and don’t want to wait for Firefox to be closed, run “firefox &”.
But the problem with the approach is if you close the shell terminal, it will also close the process. You need to execute “exit” command to exit from shell properly. But if you use execute the process with “nohup” the problem is solved. For example, if you execute “nohup firefox &”, firefox will not close even if you close the shell.

It is very helpful if you want a process to run as a simple daemon. This is not the right way to make a process daemon, but this is a good workaround to get close to a daemon. So if you want a python script to run as daemon just run
nohup python /path/to/script.py &
and your process will run in background 🙂