Written on November 6th, 2011
.

If you want to send code patches to your coworkers you don’t need to do strange things with different tools. Git has all the neccesary tools for handling this in a pretty way.
The idea is generate a patch from git and send to your coworker via email. After received the message they can import those messages directly into git.
Let’s see how all this works. Read the rest of this entry »
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 »