GEEK: port forwarding example
03-Jul-07
GEEK: ruby object methods
24-Apr-07
If you want a list of all a ruby object’s methods, try this:
puts object.public_methods.sort
GEEK: Thunderbird IMAP slow
23-Apr-07
I’m using Thunderbird (version 2.0.0.0) on a 2.16 GHz Intel Core 2 Duo (1 GB Ram) running Mac OS X 10.4.9. When I connect to my account at fastmail.fm via IMAP, it frequently takes several minutes for each folder to open, and when I send mail, it often takes several minutes to copy the sent mail to the Sent folder (and sometimes it fails altogether.) Has anyone else experienced this problem? Any suggestions for what I might do to debug it?
[Edit: This has been going on for a couple of weeks, and happened when I was running the previous release of Thunderbird. If I stop and restart Thunderbird, it goes away for a while. ]
Thanks!
Geek: notes to myself
10-Oct-06
I'm trying to select and display some rows from a FrontBase table. I'm accessing the table via a python script, which talks to the database via a pyobjc interface to an Objective-C adaptor to FrontBase.
“getSQLResultsDictionaryIter” is a method which returns an array of dictionaries containing the results.
For example, this snippet:
import objc
import ObjectModel
import FrontBase
fbc = FrontBase.FrontBaseConnection()
for m in fbc.getSQLResultsDictionaryIter("select * from MManager"):
for k, v in m.items():
print "%s : %s" % (k,v)
returns this:
joined: 2003-05-06 12:00:00 encryptedpassword : D2A55F132c83686A2a3sF9a4F5b7g0D5aCBFaB05 loginname : samplemember mailtroubleindex : 0 firstname : Sample lastname : Member previouslogin : 2006-06-09 16:21:26 fullname : Sample Member logincount : 176 Traceback (most recent call last): File "", line 2, in ? File "build/lib.darwin-8.6.0-Power_Macintosh-2.4/objc/_convenience.py", line 600, in
It's barfing on the primarykey field from the first row returned. For some reason, the adaptor code doesn't want to print the primarykey. The primarykey object is of the following type:
print type(m['primarykey'])
I listed the methods for the m['primarykey'] object as follows:
methodList = [method for method in dir(m['primarykey'])
for method in methodList
FILE = open(“test2″,”w”
FILE.write(method)
FILE.write(“\n”)
FILE.close()
Among the 363 methods were returned, hexString() looked promising.
m['primarykey'].hexString().__str__