Wednesday, February 27, 2008

Javascript photo effects

Reflection, round corners, and instant photo. Wow!

Django and Ajax

Excellent tutorial on Scriptaculous and Django to get your started on Django + Ajax.

Managing multiple Gmail accounts

Discovered MailPlane (Mac OS X only) today that lets you easily switch between multiple Gmail accounts and see the number of new emails at a glance. It works by overlaying desktop functionality on top of the embedded WebKit/Safari core. For example, you can drag and drop photos, auto resize photo prior to sending, and copy/paste images directly as attachments.

It's not free or open source but overall feels like a high quality app. The time saved in attaching images/files alone is worth the (current price) of $25, and it's a must have for people who use multiple gmail accounts.

Thursday, February 7, 2008

Subversion / Trac / Project Management Hosting Services

Code Spaces, Assembla, and Springloops appear to be the more mature Web 2.0 ones.

Overall: Assembla has the easiest to use UI and integrated project management functionality.
UI interaction: Assembla.
Visual design: Springloops.
Project management: Assembla feels the most integrated. Springloops relies on users' own BaseCamp account.
Web 2.0 feel: Springloops. Code Spaces feels more like Yahoo Mail's definition of web 2.0 interaction than 37 Signals sites.

Assembla also aims to create a market place that easily connect coders to project needs.

More are listed at
http://snook.ca/archives/servers/hosted_subversion/

Wednesday, February 6, 2008

Geocoding IP addresses with GeoIP City (GeoLite)

First install both the GeoIP C Library and the Python bindings.

Download the GeoLite/GeoIP City binary data file, and install the .dat file::
$ mv GeoLiteCity.dat /usr/local/share/GeoIP/GeoIPCity.dat
In a Python shell:
>>> import GeoIP
>>> geoip_lib = '/usr/local/share/GeoIP/GeoIPCity.dat'
>>> gi = GeoIP.open(geoip_lib, GeoIP.GEOIP_MEMORY_CACHE)

>>> print gi.record_by_name("google.com")
{'city': 'Mountain View', 'region': 'CA', 'area_code': 650, 'longitude': -122.05740356445312, 'country_code3': 'USA', 'latitude': 37.419200897216797, 'postal_code': '94043', 'dma_code': 807, 'country_code': 'US', 'country_name': 'United States'}
>>> print gi.record_by_addr("64.233.167.99")
{'city': 'Mountain View', 'region': 'CA', 'area_code': 650, 'longitude': -122.05740356445312, 'country_code3': 'USA', 'latitude': 37.419200897216797, 'postal_code': '94043', 'dma_code': 807, 'country_code': 'US', 'country_name': 'United States'}
Some quick tests showed that GeoLite City correctly geocoded 4 out of 6 (somewhat random) samples I threw at it, compared to the GeoIP web service, which presumably uses their full GeoIP database. For example, it wasn't able to geocode Microsoft.com (207.46.197.32) and matched my work IP address to LA when it should be in the Bay Area.