Aug 24 2009

SQlite3 full-text-search and some python on OSX

I did not know but it seems that the cool little sqlite3 mini-database engine had a full-text search application built into it. Unfortunately Apple (as usual) seems not too inclined on having it enabled (at least not in OSX Leopard 10.5.x).

What I read about it - it seems that it’s quite fast and usable for some purposes.

Some links first:

FTS usage in Sqlite3 in sqlite trac

Some performance and usage info on sqlite FTS3 from dotnetpearls

Enabling full text search on sqlite / Python 2.5 bundled with OSX (Leopard)

This last link gave me some ideas. I was wondering how I could make use of this small fulltext-search engine in django. I like django, and currently learning it, so that’s the reason behind.

Some links on enabling django to use sqlite full-text search:

fulltext search in sqlite and django using django’s signals

sqlite performance and django

I highly recommend the above links regarding django / python to anyone interested in those subjects as well. Very useful ideas can be found there thanks to Piotr. Appreciated.

› Continue reading


Jul 31 2009

My recommended setup for web-developers on OSX

If you want to do any kind of web-development on the Mac that involves PHP and the Apache webserver, you have a few options:

  1. Use the Apple provided, built-in apache plus PHP. You can turn on the web-server (with PHP) in your system preferences menu as ‘Web Sharing’. From that point on your Sites directory will function as your web document root (~/Sites). The bad thing with this setup is that you cannot just install any kind of PHP module, or apache module. Or if you do, you will regret it once the next system update arrives from Apple (which - by the way - overrides all your changes…)
  2. Download and use MAMP. I have seen it used in lots of tutorials and books. The only bad thing with it, is that it is quite spartan, and has been updated quite a long time before (2008-08-27) - seems that its devs are abandoning it for good. Not recommended.
  3. My recommendation is to use XAMPP. The good thing with XAMPP is that it is more or less regularly updated with not so major breaking changes, but still keeping you on top of the almost very latest PHP / MySQL releases. XAMPP is also cross platform in the widest sense of the world. This is good mostly for Mac / Windows users, but some Linux users could also benefit. XAMPP is available for the Mac, Windows, Linux, and Solaris platforms.

I have been using XAMPP for almost 2 years now. I have just recently upgraded my previous pre1.0 version to its latest 1.0.1 version - which includes MySQL 5.1.33, PHP 5.2.9, Apache2.2.11 with mod_ssl support and tons of other modules. You can download the OSX version from here.

If you use XAMPP you will just unpack its files into your /Applications folder (the path must be this, otherwise all the scripts will break inside), then drag /Applications/XAMPP/XAMPP Control to your dock and you can start enjoying it.

I do have a few recommendations for OSX users though.
None are too important, it’s just my way of thinking.
› Continue reading


Apr 14 2009

Lorem Ipsum generator for OS X

If you do any web development or page layout / editing then sooner or later you realize that this old latin text is being used all around. 

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Although some web-development IDEs have a built in snippet editor that contains this handy text (e.g. Coda form Panic) and there are various websites (lipsum.com) devoted to generating tons of paragraphs of this text and its variations I found the following 2 short applications to be of most use to me on the Mac. › Continue reading