wesley tanaka

Tech

Updating linux heroes of might and magic 3 to 1.3.1a

()

wget ftp://mirrors.dotsrc.org/lokigames/updates/heroes3/heroes3-1.3.1a-unified-x86.run

_POSIX2_VERSION=199209 ./heroes3-1.3.1a-unified-x86.run --keep

Download http://downloads.sourceforge.net/goldenfiles/loki_patch-fix-0.1.tar.gz

tar xvfz loki_patch-fix-0.1.tar.gz

cp Loki_patch-fix/fixedpatch heroes3-1.3.1a-unified-x86/bin/Linux/x86/loki_patch

./heroes3-1.3.1a-unified-x86/update.sh

diff .po files

()

I had two .po files (one of which was saved from poEdit) which had their strings in a different order, making the unix diff utility useless in looking at the differences between them. Loading and re-saving the other .po file inside poEdit sorted the strings in the same way, allowing diff to work quite well.

Using xscreensaver hacks in gnome screensaver in Fedora Core 5, 6, 7

()
Pretty easy:
sudo yum -y install xscreensaver-extras-gss xscreensaver-gl-extras-gss

Drupal 5 _drupal_cache_init() performance

()

_drupal_cache_init() will attempt to fetch the page to be generated from the cache_page table, even if caching is turned off on a Drupal 5 site.

Actually, this seems like a bona-fide bug, so I think I'll file it.

Looking at the Drupal CVS source code, it appears the bug is still in Drupal 6 at the moment.

Drupal 5 system table performance

()

Every page view in drupal runs this query:

SELECT name, filename, throttle FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC

Adding a key

ALTER TABLE {system} add key wtanaka_modulelist(type(6),status,weight,filename);

seems like it should help in theory. The explain changes from this full table scan with filesort:

Speeding up performance of Drupal 6 themes that call l()

()

CVS Drupal 6's l() function calls check_url every time it gets called, which is sort of slow. I'm not totally sure why -- that kind of cleaning should be handled inside url() (and it looks like it already is). But I'm not confident enough to get rid of it in my l() backport module.

Database index for Drupal's Who's New Block

()

Trying to speed up user_block's block #2 (Who's New) which currently uses a query that needs a filesort. Although the "status" column can only be 0 or 1, the query is expressed as status != 0 -- I think someone expects the status column to have more possible values in the future.

poEdit and Drupal's Locale Export

()

Just downloaded poEdit onto the computer of someone who is going to help me with some translations. However, when I tried to export a .po language file from Drupal (5.1) and open it in poEdit, I got an error message that said:

Couldn't load file xxx.po, it is probably corrupted.

The details added:

Broken catalog file: singular form msgstr used together with msgid_plural

Looking through the file, I found that it contained blocks of lines like:

ubuntu live cd unionfs and tmpfs

()

Been reading about tmpfs and unionfs to try to get an Ubuntu live CD to take advantage of hard disk space that might be available when an Ubuntu live CD boots up.

It's possible to increase the size of the /tmp filesystem by remounting it with something like

Ubuntu Edgy Eft (6.10) flash plugin

()

In the grand tradition of eating your own dog food, I've started using the live CD that my uncle is preparing for my grandparents. The first thing I noticed was that the flash plugin was missing. First I tried enabling "multiverse" and installing it into my live CD image using apt-get. It wanted to grab an old version 7 flash player, so I aborted and tried enabling "edgy-backports" and installing again. That time, it failed with some kind of md5sum mismatch error.

Syndicate content
by Wesley Tanaka