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

update-ppa

like

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

Netbeans tip: Show Files starting with dot (.) [files like .gitignore / .hidden ] in NB Projects

By default Netbeans hides files starting with a dot (.) except the htaccess file.
You can change this behavior by going to
Tools > Options > Miscellaneous > Files
Here you will see “Ignored Files Pattern:” under “Files Ignored by the IDE”
I have changed the pattern to

^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn)$|~$

and now I can see .gitignore, .hidden, etc. files in my projects.

 

PS: Thanks to Josh Pratt‘s post

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 🙂