Written on February 9th, 2011
.

And here is another post about our daily job with git, this time talking about how to setting up a remote git repository with digest authentication and support for pushing changes using http protocol.
There is a lot of options to setup a git repository: git-daemon, gitosis, ssh, and more.
- The more secure way is to use ssh protocol but it needs to create user accounts for each user you want to allow to pull and push changes from the remote repository.
- For the other hand git-daemon is the faster way that allows to publish a public repository but if you needs to restrict access for some users (allow/disallow push/pull or view one entire repository) this won’t be your best choice.
Now I will write all the steps to setup a remote git repository that uses http protocol.
Read the rest of this entry »
Written on February 3rd, 2011
.
If you want to sort an array of objects but using one of its object properties you can do it with usort, but this could take a lot of time and will be very computational expensive.
So I have implemented one method you can insert into one of your PHP classes. This method implements the quicksort algorithm.
As a result I have experienced a huge performance improvement against usort: one array of objects with 10.000 elements sorted with usort takes ~3.4 sg, and with quicksort algorithm takes, in my samples, ~0.56 sg. Awesome isn’t it?
Read the rest of this entry »
Written on January 27th, 2011
.
If you are using Smarty as a template system in your PHP project you will be very pleased to use this tiny-but-very-useful outputfilter that I made.
Smarty as you can read in its documentation has some extension points where you can create plugins into to extend its functionality. One of them are outputfilters, that allow us to operate on a template’s output, after the template is loaded and executed, but before the output is displayed.
So you can modify your final HTML code with those extentions point without a any pain.
Read the rest of this entry »
Written on January 13th, 2011
.
In our company we migrated all our SVN repositories to Git, as the migration is not straight forward I wrote down it and made available for all of you. Some tips are taken from documentation and others from other websites.
So, let’s go! Read the rest of this entry »