Git how to create remote branch from checked out master

0

In a project you’ll reach at a certain point the need to start working on a new major version of your application, lets say version 2. Then you’ll probably want the current master to move to a branch with a name like “1.x” and from then on the master branch will contain version “2.x”.

To accomplish this, you’ll have to do some simple steps. I assume you already have a Git clone on your computer, go to the root directory of your clone and make sure you are in the master branch.

git branch -a

The branch with More >

Ubuntu 11.04 / OpenPanel – Install Webalizer

2

Make sure you make all changes as user “root”.

Install Webalizer

apt-get install webalizer

First change the default webalizer config.

nano /etc/webalizer/webalizer.conf

Incremental processing allows multiple partial log files to be used instead of one huge one. And OpenPanel creates multiple files by default, so lets set “incremental” to yes.

#Incremental     no
Incremental     yes

OpenPanel created apache log files per virtual host, so we don’t have to do that by ourselves. The access log files are located at “/var/log/apache2/openpanel/logs”.

To generate stats from an apache access log file, you’ll have to execute the following More >

Ubuntu 11.04 – Netbeans 7 clear cache

0

Sometimes code completion for Netbeans can be corrupted and will not work anymore for a certain project. This can be fixed if you clear the Netbeans cache.

Close Netbeans. Remove the cache folder:

rm -rf "/home/YOURNAME/.netbeans/var/cache"

Start Netbeans 7 and everything should be working fine again!

Ubuntu 11.10 – Add Netbeans to Unity launcher

1

To add Netbeans to the Unity launcher in Ubuntu 11.10 is unfortunately not as easy as executing the application and click “Stick in launcher”.

Problems: - If you click on the icon again, it will try to start a new instance of Netbeans. Netbeans will see that it’s already opened, so it will not start another instance, but this way it’s still dirty and slow. - Unity will forget the link on reboot, so the icon disappears.

To solve these problems, download http://plugins.netbeans.org/plugin/40321/unity-launcher first.

Open Netbeans and go to Tools -> Plugins -> Downloads -> More >

Ubuntu 11.10 – Install downloaded deb file with dependencies

0

First of all, let me say it’s always best to install with the Ubuntu software centre or Synaptic (still my personal favourite). But if the package is only available for download on a certain website, for example MySQL Workbench, you must download the deb file (debian package) and install it by yourself. Open a terminal and execute:

sudo dpkg -i downloaded_package.deb

You will probably get errors about missing packages (dependencies) now. Execute:

sudo apt-get -f install

You’re done! The debian package is now successfully installed with all its dependencies!

Disable jqGrid data load on initialization

0

I have a jqGrid in a tab that is initalized on page load, but at that time the tab is not visible yet. Because the tab is not visible, the grid JSON data should not be loaded right after grid initialization. It’s not very intuitive to get this done, but it’s quite easy to do!

Set the grid attribute:

datatype: local

If the tab is clicked the following code must be executed to load the Grid data:

$('#my-jqgrid-ID')     .jqGrid('setGridParam', { 'datatype' : 'json' })     .trigger('reloadGrid');

Reload jqGrid

0

Today I was looking for the method to reload the JSON data of jqGrid.

With firebug I selected some element the grid was in with:

$('.ui-jqgrid', '#tab-ínfo').trigger('reloadGrid');

I chose .ui-jqgrid because that was one of the classes of the grid container. But this doesn’t work! The grid table tag is the element that has the actual grid ID. In order to get the generic code above work, we have to add the table element.

$('.ui-jqgrid table', '#tab-ínfo').trigger('reloadGrid');

And now it works as expected!

Go to Top