wesley tanaka

Tech

Smell printer 2011

()

Updating the locate database one time only in Mac OS X

()

If the locate database hasn't been created yet on a Mac OS X 10.6 (Snow Leopard) computer, the message:

Color Range Mapping in Gimp 2.6

()

The plugin formerly known as Map Color Range in GIMP 2.2 and Color Range Mapping in GIMP 2.4 appears to have been removed in GIMP 2.6.

One way to get it back is to just grab the plug-in file from a previous version.  For example, you can run:

wget http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386.newkey/os/Packages/gimp-2.4.5-1.fc9.i386.rpm

rpm2cpio gimp-2.4.5-1.fc9.i386.rpm|cpio -idvm

"This site may harm your computer" google bug

()

a.k.a. #googmayharm

At first, I thought I had been hacked:

Show ignored files in Git

()

How do you see or find untracked files in your Git working copy that Git ignores?

Files which do not show up in git status because they match a pattern/line in .gitignore or .git/info/exclude with this command:

Git 1.6:
git ls-files --others -i --exclude-standard

Git 1.4, 1.5:
git ls-files --others -i \
--exclude-from="`git rev-parse --git-dir`/info/exclude" \
--exclude-per-directory=.gitignore

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 manage.py runserver
Traceback (most recent call last):
File "manage.py", line 18, in <module>
InstallAppengineHelperForDjango()
File ".../mysite/appengine_django/__init__.py", 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, '');

unfiglet

()

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.

Previously

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.

Syndicate content
by Wesley Tanaka