Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts

Thursday, July 31, 2014

PHP - Launch command in background

 "command to launch" > /dev/null 2>/dev/null &

Saturday, April 12, 2014

CakePHP - Containable Behaviour in Models

Ejemplo básico haciendo el bind del comportamiento on the fly

$this->University->Behaviors->load('Containable'); 
$containArray = array( 'Course' => array( 'Group' => array( 'Studen' => array( 'Marks' ) ) ) );
$options = array( 'contain' => $containArray, 'conditions' => 'University.name = "Universidad de Sevilla"', ); 
$sevillaMarks = $this->University->find('all', $options);

Maravilloso add-on incluído en el Core de CakePHP que nos facilita la tarea de cuando las relaciones a buscar empiezan más allá de tercer nivel en profundidad. 

http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html

Thursday, January 16, 2014

OS X Terminal Tip: How to go to a custom position in the Terminal?


Alt + Click in position

vía: HackerNews

Useful conditions
  •  Edit a very long command and want to edit or fix a typo in the middle of the sentence.
  •  Go to the specific position when you are using nano

Thursday, November 28, 2013

Git Tip: Basic Tag Commands

Crear etiqueta
git tag v2.3.4 -m 'Added new Payment Methods'

Listar Etiquetas
git tag

Listar Etiquetas y Mensajes
git tag -l -n1

Ir al código de una etiqueta concreta
git checkout tags/v2.3.4


A partir de aquí imágenes de resultados y las referencias

Tuesday, September 17, 2013

Wednesday, July 17, 2013

Evitar recargar Fixtures entre Tests en CakePHP

¿Se puede evitar la recarga de fixtures entre tests en CakePHP?

Respuesta corta: No, y de hecho es el mejor comportamiento que puede tener

Respuesta larga: Valora si quieres hacer esto, si sigues con esa intención sigue leyendo...


Friday, March 29, 2013

Git Tip : Ignore changes in tracked file



git update-index --assume-unchanged <FILENAME>

via: tutsplus

Ejemplo de uso a continuación.

Tuesday, December 4, 2012