Archive for July, 2008
Thursday, July 31st, 2008
To export PostgreSQL data to csv file using psql interactive terminal.
open terminal
su postgres
psql <db_name>
\f ','
\a
\t
\o outputfile.csv
select ..... (your sql statement)
\o
\q
Additional notes: If you want a TAB delimited file instead of comma, use \f 'Ctrl-V TAB'. \f sets the field separator. \a echo all. \t tuples(rows) only. \q quit.
Posted in BrnDmp | No Comments »
Monday, July 14th, 2008
CentOS 5.2 install for Moodle. Pretty straightforward. It gets tricky when installing the pgsql database. This is how I do it:
install PostgreSQL database server with yum
Add a user to the system which you want to user as Moodle databaseuser
start the PostgreSQL service with: service postgresql start
Add PostrgreSQL and httpd to ...
Posted in BrnDmp | No Comments »
Monday, July 14th, 2008
Client got a timeout when trying to create and Excel export of some custom Moodle report we created. Excel exporting function is not really efficiently setup but I cooked up a workaround for the problem:
run the excel export as command line php and redirect the output to filename.xls. Then write ...
Posted in BrnDmp | No Comments »
Monday, July 14th, 2008
alias server_name='ssh -v -l USERNAME IP ADDRESS'
Posted in BrnDmp | No Comments »
Friday, July 11th, 2008
We use awstats to monitor web traffic but what I am really interested in is number of concurrent users. So I made a dump of the mdl_log table and processed that in a spreadsheet:
Maybe I should start to do statistical analysis in R statistical package.
Posted in BrnDmp | No Comments »
Friday, July 11th, 2008
Rolled out a script to create Blackboard snapshots from a source table.
installed files in dir
edited db connection
adapted tables in database to new structure
based on file update_synch_db.sql
run script to test
adapted output dir
Posted in BrnDmp | No Comments »
Friday, July 11th, 2008
The guys at commoncraft.com have a sensible post on being lightweight. I like that thought, being lightweight. Should implement it in my own life. They have great refreshing ideas about lots of stuff like not meeting customers,
Posted in BrnDmp | No Comments »
Friday, July 11th, 2008
Customer removed block from homepage and asked us if we can still retrieve it. Answer is no. Moodle deletes the record from the database.
Posted in BrnDmp | No Comments »
Friday, July 11th, 2008
Installed RPM-forge repositories for CentOS, from CentOS wiki.
Now I can include clamav and other interesting packages to my yum installer.
Works like a charm.
Posted in BrnDmp | No Comments »