Text 2 Audio File in OS X

Tip: If source file is a PDF or image file, use Google OCR to convert to text file first

say -f [text file] -o [output audio file.aiff]

Tip 2: Dragging into iTunes and right clicking on the file to select “Make AAC Version” will allow this audio file be synced into portable devices.

搬家, again

Byebye Eka & Seana :’(

Hello convenience and food.

Byebye big house, but someone else’s house.

Hello new sweet home and peace of mind.

Looking forward to the next move :)

Next Move: Summer 2010.

GeoIP C API + mod_geoip on OSX 10.6

Run the configure script as the following:

MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch i386 -arch x86_64 -bind_at_load” ./configure

IP -> Location

GeoLite City vs GeoIP City:

GeoLite City GeoIP City
Cost Free $370 initial, $90 per month updates
Coverage Worldwide Worldwide
Accuracy Over 99.5% on a country level and 79% on a city level for the US within a 25 mile radius. More details Over 99.8% on a country level and 83% on a city level for the US within a 25 mile radius. More details
Redistribution Free, subject to GPL/LGPL for APIs and database license. Commercial redistribution licenses are available Please contact us
Updates Updated monthly, at the beginning of each month Updated monthly. For binary format, weekly updates, automated updates available by using geoipupdate program included with C API

Very evil indeed.

  1. Download and install GeoIP C API from here.
  2. Download and install GeoIP Python API from here.
  3. Download latest GeoLite City Binary Format from here.
  4. Extract GeoLite City file to /usr/local/share/GeoIP/

Example uses of API can be found in test*.py that comes with Python API.

Trac on OSX Leopard

  1. Use svn 1.44’s svnadmin to create repository
  2. Use Macport to install python 2.6 and its subversion bindings
  3. cp /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Trac-0.11.4-py2.6.egg/trac/admin/templates/deploy_trac.fcgi /Library/WebServer/CGI-Executables/deploy_trac.fcgi
  4. edit /Library/WebServer/CGI-Executables/deploy_trac.fcgi and add in #!/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python on first line
  5. Follow ‘Configure Apache to run TRAC using FastCGI’ section in Installing a Secure Subversion Server on Leopard
  6. Add a plist:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
    <plist version=”1.0″>
    <dict>
    <key>UserName</key>
    <string>root</string>
    <key>KeepAlive</key>
    <dict>
    <key>SuccessfulExit</key>
    <true/>
    </dict>
    <key>Label</key>
    <string>svnserve.plist</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/bin/svnserve</string>
    <string>-d</string>
    <string>-r</string>
    <string>/var/svn</string>
    </array>
    </dict>
    </plist>

Very PITA at some steps.

All Rights Reserved Copyright © 2008 Design by StyleShout and Clazh