Quick Tips

To increase the file upload and post size limit in moodle, edit "/etc/apache2/conf.d/moodle" as well as "/etc/php5/php.ini"

To remove all files and folders except a particular file do the following, replacing somefile.txt with whatever you need:

find -iname "*"   \! -iname "somefile.txt" -exec rm -rf {} \;

To reset the postgres password or set a password do the following:

echo "localhost   all   all   trust" | sudo tee -a /etc/postgresql/8.3/main/pg_hba.conf /dev/null
su - postgres
psql
CREATE USER root WITH PASSWORD 'password'; 
ALTER ROLE root SUPERUSER; 
\q

To set the default character set to utf8 in mysql (to stop broken encoding for non English languages) Edit /etc/mysql/ and add the following under [mysqld]

default-character-set=utf8
skip-character-set-client-handshake

In case you accidentally move all the files for your user to the wrong directory. You can easily move them again where they should go by executing the following in the directory you copied the files to:

 find . -user "nubae" -exec mv -f {} web/ \;

Rate It! (Average 0, 0 votes)