Moodle e módulos através do git

Por eduardo

moodle
$ cd /path/to/your/webroot
$ git clone git://git.moodle.org/moodle.git moodle - clonar moodle para a pasta moodle
$ cd moodle
$ git branch -a - mostra os ramos
$ git branch --track MOODLE_29_STABLE origin/MOODLE_29_STABLE - cria um ramo local e prepara-o para fazer o track desse ramo com o remoto da versão MOODLE_29_STABLE
$ git checkout MOODLE_29_STABLE - muda para o novo ramo local

Bring back deleted files with lsof

Por eduardo

Author: Michael Stutz
There you are, happily playing around with an audio file you've spent all afternoon tweaking, and you're thinking, "Wow, doesn't it sound great? Lemme just move it over here." At that point your subconscious chimes in, "Um, you meant mv, not rm, right?" Oops. I feel your pain -- this happens to everyone. But there's a straightforward method to recover your lost file, and since it works on every standard Linux system, everyone ought to know how to do it.

Fazer backup e restore duma base de dados

Por eduardo

apenas uma base de dados:
backup:
mysqldump -u root -p Tutorials > tut_backup.sql

restaurar (se a base de dados não existir terá que ser criada):
mysql -u root -p Tutorials < tut_backup.sql

backup total:
mysqldump -u root -p --all-databases > alldb_backup.sql

restaurar apenas uma base de dados de um backup total aqui

http://webcheatsheet.com/sql/mysql_backup_restore.php