A lot of people use the minimize.m code from Ramussen, but a few understand what is going on inside. I found this useful note from the author, explaining the CG and his implementation, thought would be helpful for others as well :)

Conjugate Gradient descent explained by C.E Rasmussen
google.fr