A few notes I collected after searching online for information about installing Catalyst, the MVC Web framework for Perl. This approach uses pre-built Debian packages which install a lot quicker than compiling things yourself using CPAN — plus, this way you don’t have to tinker with the modules that somehow fail tests, which inevitably happens with such a large dependency base.
First, set up the unstable repository and pin it so that most packages don’t get installed from unstable — just the Perl ones.
/etc/apt/sources.list:
# the main Debian packages.
deb http://mirror.cc.columbia.edu/pub/linux/debian/debian/ lenny main contrib
# Unstable
deb http://http.us.debian.org/debian unstable main non-free contrib
/etc/apt/preferences:
Package: *
Pin: release a=stable
Pin-Priority: 700
Package: *
Pin: release a=lenny
Pin-Priority: 700
Package: *
Pin: release a=unstable
Pin-Priority: 600
Next, install a sampling of useful modules from Task::Kensho:
aptitude -t unstable install liblocal-lib-perl libtest-simple-perl \
libtest-most-perl libtest-exception-perl libtest-pod-perl \
libtest-pod-coverage-perl libtest-memory-cycle-perl \
libdevel-cover-perl libmoose-perl libpoe-perl \
libmodule-install-perl libperl-critic-perl libcarp-always-perl \
libdatetime-perl
Install modules recommended by Catalyst docs:
aptitude -t unstable install sqlite3 libdbd-sqlite3-perl \
libcatalyst-perl \
libcatalyst-modules-perl libdbix-class-timestamp-perl \
libdatetime-format-sqlite-perl libconfig-general-perl \
libhtml-formfu-model-dbic-perl libterm-readline-perl-perl \
libdbix-class-encodedcolumn-perl libperl6-junction-perl \
libtest-pod-perl
I’ve had many inkjet print heads that eventually got dried up and started streaking when printing. These supposedly delicate parts consist of a very fine, narrow channel for ink of each color. The extremely narrow width allows them to position ink precisely, but it also means they can clog easily with dried ink.

The solution for clogged ink heads is pretty simple: Rinse with hot, hot water. Boiling water, in fact. I poured a small cup slowly over the print heads for about ten seconds, dried it off with a towel, and stuck it back into the printer. PRINTS LIKE NEW!
Many sites advise treating the print head much more carefully: make measured-out solutions of ammonia, soak a paper towel, and leave the print head resting on the towel overnight. But soaking for hours has never worked for me. Lesson learned: The print head is remarkably resilient.
I’ve tried this now with two printers: a Canon i560s and a Canon iP1800. Worked perfectly both times. The iP1800 has cartridges with built-in print heads, so I worried that water would enter and dilute the just-refilled cartridges. The cartridge would just be junk if I couldn’t get it working, though, so I gave it the scalding-hot treatment anyway. It worked!
For my final AP Computer Science project in June 2008, I worked with Brandon Liu and Yuzhi Zheng to develop FINALE, a falling block game based on the PSP game Lumines. The object of the game is to match colored blocks into squares, which are cleared away when the “time bar” passes them. Clearing more squares in each pass of the time bar gives an exponentially larger number of points.
Here are some screenshots. (I’m happy to say our graphical presentation was spectacular, with all graphics, backgrounds, and game pieces custom designed in Inkscape.)
-
-
Main Menu
-
-
Instructions
-
-
Matching squares – zooming animation
-
-
Multiple levels and particle-based explosions
-
-
The Final Level – How long can you survive?
-
-
High Scores
Continue reading ‘FINALE: a falling block game’
(On Debian 5.0. May be slightly different on other distros)
Create files in /etc/skel/:
$ cd /etc/skel
$ mkdir -P etc/php5
$ cp /etc/php5/apache2/php.ini /etc/skel/etc/php5/php.ini
$ mkdir fcgi-bin
$ vi fcgi-bin/php5.fcgi
Paste the following:
#!/bin/bash
export PHPRC=$PWD/../etc/php5
umask 022
export SCRIPT_FILENAME=$PATH_TRANSLATED
exec /usr/bin/php-cgi
Then, in Virtualmin > System Settings > Server Templates > Default Settings > Apache website > Directives and settings:
ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/public_html
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
DirectoryIndex index.html index.htm index.php index.php4 index.php5
Options -Indexes IncludesNOEXEC FollowSymLinks ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper ${HOME}/fcgi-bin/php5.fcgi .php
AddHandler cgi-script cgi
Important notes:
ExecCGI is required! Otherwise, 403 Forbidden errors will occur.
- The wrapper script and php files must not be group/world-writable!
- Look in
/var/log/apache2/suexec.log for hints if you’re having trouble.
I recently switched to running XP as a limited user after getting a virus. However, I soon realized that I couldn’t use my Sony VAIO S260′s power management features anymore. When I went into the VAIO Power Management tab, everything was grayed out. Logging in as Administrator, I could create profiles, but then I wouldn’t be able to see them in a regular user. Here’s the solution:
- Allow the limited user account (LUA) to change power options. This will let you change the Windows built-in options, but not the VAIO-specific options.
- Temporarily make your LUA administrator either manually (requires logout/login) or using MakeMeAdmin.
- Open up the Power Options control panel (
powercfg.cpl).
- Set up your power profiles as you want them, using the VAIO Power Management tab. These will be visible since they’re created in your own user account, rather than Administrator’s.
- Now you’ll be able to switch between profiles without using MakeMeAdmin–just click the battery icon in the notification area. Changing the VAIO-specific options of profiles still requires MakeMeAdmin though.