web development

Installing PHPUnit on MAMPs

After spending sometime searching on how to it. I just want to document what worked for me.

My setup MAMPs version 2.1.1 , php version 5.4.4, pear version 1.9.4

sudo /Applications/MAMP/bin/php/php5.4.4/bin/pear config-set auto_discover 1
sudo /Applications/MAMP/bin/php/php5.4.4/bin/pear install pear.phpunit.de/PHPUnit

Now you should be able to do

require_once 'PHPUnit/Autoload.php';

To make it available on the command line everywhere you need to create a simlink to phpunit in your local bin.

sudo ln -s /Applications/MAMP/bin/php/php5.4.4/bin/phpunit /usr/local/bin/phpunit
phpunit --version
web development, wordpress

How to add a header image to your raw thesis theme.

Recently we got a small request to add a header image to the thesis theme. Curretly there is no option to add this to the thesis theme we are using right now. And since we don’t allow our user to make changes to theme files for security, stability and other good reasons.

However, there is a workaround, thesis allows you to place html into the footer of every page.
In case you need to add scripts to your footer (like Google Analytics tracking code).

You can use the textarea to create a header using css. The textarea can be found in the thesis options page.
thesis theme footer textarea

Here is the HTML/CSS that I am using in my case.

 background: url(https://blogs.ubc.ca/enej/files/2009/08/home.png) no-repeat 0 28px;
web development

Scholarpress Courseware

One of my goals this summer was to start developing templates, plugins for wordpress, that would eventually enable wordpress to be used to as courseware. I am glad to find that I am not the only one (outside of UBC) to be working and thinking about this option. Both Jeremy Boggs and Dave Lester have started working on something very similar.

The project is called Scholarpress Courseware and it looks very promising.

Courseware enables you to manage a class with a WordPress blog, including a schedule, bibliography, assignments, and other course information.

My plan for the upcoming week or so is to extend the plugin, to include the following.
Lecture Notes, Syllabus, Resources, Readings, Simple Calander, Schedule, Projects Etc.

This is just the beginning…