Google App Engine Helper For Django with App Engine 1.1.8

Google App Engine Helper for Django r52—the one that works with the Django 0.96 that comes stock with Google App Engine—no longer works with Google App Engine 1.1.8. It gives an error like:
cd mysite; /usr/bin/python runserver
Traceback (most recent call last):
File "", line 18, in <module>
File ".../mysite/appengine_django/", line 440, in InstallAppengineHelperForDjango

Simple Tests in Drupal 6

There are two simpletest modules for Drupal 6.  The 2.x branch (currently at 6.x-2.5) is a backport of the unit testing framework that will be included in Drupal 7.

Unfortunately, error handling is not very good and it is possible to get inscrutable errors like this when running a test:

Running SimpleTests

An error has occurred.
Please continue to the error page
An error occurred. /batch?id=30&op=do

trim a string in Javascript

str = str.replace(/^\s+|\s+$/g, '');


I got my first figlet spam today.  The spammer didn't choose a very legible figlet font.  Still, I thought it was clever. Dan Egnor's unfiglet script—merely a funny joke back then—actually needs to be written for real now. I bet the gmail people already have one.


Unintuitive Python Behavior

Curious about the Google App Engine, I started playing with it, which meant writing code in Python.

Unicode support in Python seems to be a tangle of confusing function names, source code file encodings, backslash escapes, the letter "u" before strings, and probably other things. Together, this smells to me like the language originally didn't support Unicode, but wanted to keep backward compatibility with pre-unicode-support scripts.

MySQL Database Table Schema for domestic geonames

A MySQL schema for the domestic part of the geonames database. If you find any errors, please leave a comment below.

ndiswrapper in Fedora 8

Based on the name, the dkms-ndiswrapper-1.48-1.fc8.rf claims to support Fedora 8. It is the latest version from the yum repository. Unfortunately, it no longer seems to compile (much less install) correctly.

% sudo /usr/sbin/dkms build -m ndiswrapper -v 1.48-1.fc8.rf

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make KERNELRELEASE= KERNEL_LOCATION=/lib/modules/ exit status: 2)

Moment of Mourning Online

A dip in Google search traffic during the three minute moment of silence on May 19 mourning the victims of the Sichuan Earthquake.

Convert Videos for playback on Nokia N82 in Fedora 8

I found this command line online for converting videos to H263 .3gp files in Linux:

ffmpeg -i inputfile.avi -s qcif -vcodec h263 -acodec mp3 -ar 8000 -ab 32 -y outputfile.3gp

It seems to be a bit out of date, as it gives:

WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Unknown encoder 'mp3'

Those two problems are easily fixed:

Pass PHP variables to Javascript in Drupal 6

To access PHP values and variables from Javascript using Drupal, you can send them to your javascript code using Drupal's drupal_add_js as follows:

drupal_add_js(array('mymodule' => array(
'username' => 'Mike',
'uid' => 123,
'likes' => array('ice cream', 'peanuts', 'coffee'),
)), 'setting');


Subscribe to RSS - Tech