Recent blog entries for wtanaka

5 Jun 2008 »

It's counterintuitive that you need to unquote Google App Engine URL parts twice.

4 Jun 2008 »

delete index: google app engine

appcfg.py vacuum_indexes ./

4 Jun 2008 »

Google App Engine Data Migration: Deleting an attribute

One can:

  1. Change the model class definition so that it extends Expando.
  2. Remove the undesired attribute from the property definition list.
  3. Add code which calls del mymodel.myattribute on all the entities eventually
  4. Change the model class definition back to Model

31 May 2008 »

Google App Engine appcfg.py update error:

Could not guess mimetype for favicon.ico. Using application/octet-stream.

Solution:

Add mime_type: image/vnd.microsoft.icon to the appropriate part of app.yaml

30 May 2008 »

Serializing to JSON with Google App Engine

from django.utils import simplejson

Then: http://simplejson.googlecode.com/svn/trunk/docs/index.html

30 May 2008 »

To create a Google app engine custom 404 page, add a handler that matches everything as the last handler:

(r'.*', DefaultHandler),

And somewhere in that handler, call self.error(404)

29 May 2008 »

Google App Engine WSGIApplication for Drupal Users:

(r'/path(?:/(.*))?', HandlerClass),

registers HandlerClass for URLs of the form:

/path
/path/
/path/something
/path/something/else

But not:

/pathfoo

HandlerClass get method should then start with:

   def get(self, args):
      if args is None:
         args = ""

25 May 2008 »

printf debugging in GreaseMonkey without the modal dialog box of alert():

  • You can use GM_log, which logs messages to the Error Console.
  • With the Firebug extension, you can do e.g. console.log("Link: %o", document.links[0]) to log messages and inspect elements. Don't forget to remove the Firebug code before distributing the script.
  • You can use dump() statements to print debugging info to the Firefox console.
  • You can set window.status = message_string, understanding that the status bar text is transient: many other processes within Firefox set it.

21 Mar 2008 (updated 21 Mar 2008 at 09:16 UTC) »

Firefox 2 font configuration in Fedora 8 Linux does not come from GNOME font settings. If you have, at some point turned on sub-pixel font rendering for your LCD in Firefox and want to turn it off because the colors around the edges of the letters are ugly (or if you want to turn it on because you think it looks better), the settings are located in ~/.fonts.conf

The default subpixel font setting is off, so to turn off subpixel rendering in firefox (and reset all the other settings to defaults), one can simply delete ~/.fonts.conf

This also works for seamonkey

12 Nov 2007 (updated 12 Nov 2007 at 14:39 UTC) »

Was getting a lot of
[Errno 12] Timeout: <urlopen error timed out>

with yum. Went into /etc/yum.conf and added a line:

timeout=120

documentation was in man page yum.conf(5).

That helped a bit, but fetching mirrorlists was still giving the Errno 12 timeout error almost instantly. Worked around that by just pointing the yum.repos.d entries at a particular mirror. Probably some bad interaction with going through tor/privoxy (necessary to work around some recent china telecom auto-blocking)

12 older entries...

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!