Skip to content. | Skip to navigation

Sections
Personal tools
What is this?
Hi, my name is Tom Lazar and I'm a Plone and Zope developer based in Berlin, Germany and this is my personal and professional (no big difference, really...) website.
 

geek

Feb 19, 2008

The Mother of all Font Conversion Solutions

Filed Under:

I got an urgent call from a client yesterday evening. He needed 150 Windows Postscript fonts converted for Mac OS X by next morning. Hooray! Well, for those of you who care to remember, such stuff used to be the domain of rather expensive and cumbersome Software, so rejoicing wasn't exactly what I did. Turns out, though (and that's the reason I'm blogging this) that the situation is far less bleak than back in 1997 when I used to deal with such issues regularily: because now there exists a very fine Open Source solution for font editing (and in my case more importantly) font conversion: FontForge.

It requires X11 to run on Mac OS X but the beauty is, of course, that it can perform conversions also from the command line. But the fun doesn't stop here: it also features its own scripting language and a handy example for batch converting fonts so the potential nightmare of creating those 150 TrueType fonts turned out to be a breeze.

Aug 06, 2007

Bitten by the Twitterbug...

Filed Under:

It was just a matter of time, wasn't it...

Ok, I too, have finally succumbed to the 'twitterbug' and have created my own account (the id 'tomster' was taken already, guess I really was too late for that one...)

To complete my conversion I've created a quick-and-dirty portlet that display my latest entries... uhm... 'twitters'... Just create a 'Page Template' named 'portlet_twitter' in your 'plone_skin/custom' folder and paste this into the ZMI:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal" i18n:domain="plone">
<body>
    <dl metal:define-macro="portlet" class="portlet" id="twitter_div">
        <dt class="portletHeader"><a class="twitter-title" href="http://twitter.com/TWITTERID/">Twitter updates</a></dt>

        <dd class="portletItem">
            <ul style="margin-left: 0; list-style-type: none; list-style-image: none;" id="twitter_update_list"></ul><script type="text/javascript" src="http://twitter.com/javascripts/blogger.js">
</script> <script text="text/javascript" src="http://twitter.com/statuses/user_timeline/TWITTERID.json?callback=twitterCallback2&amp;count=5" type="text/javascript">
</script>
        </dd>
    </dl>
</body>
</html>

You will (obviously) need to replace TWITTERID with your actual twitter id, of course. You can then refer to it with the expression 'here/portlet_twitter/macros/portlet' in the root properties of your site. This will work up to Plone 2.5.x.

A nice side effect of it using Javascript is that I won't even have to touch my caching setup in order to have live updates on my site.

I'll see where this will take me. I'm viewing it primarily as lowering the threshold to posting tiny little bits that I find interesting. (So expect lots of stuff around Python, Zope and Plone...)

May 03, 2007

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Filed Under:

From the One-Entry-Per-Month-Minimum-Department

Quick and dirty: you've probably already heard about the issue surrounding the HD-DVD processing key, but here's a really neat variation: the hex-value of the key encoded in webcolors as a banner...  how cool is that?

Sep 02, 2006

CSV ticket import for trac with PostgresQL

Filed Under:

Another reason why open source software is cool: if it doesn't work for you, you can always still fix it ;-)

A (as of yet) unofficial and very useful feature of trac is to import tickets from... well, anything by providing a CSV-importer script. However, it didn't work with PostgreSQL as backend - turns out, it uses double-quotes around string literals in its SQL-statements - something that PostgreSQL frowns upon... after modifying all statements to use l33t single-quotes all works like a charm. You can find a patched version of the script here on my site, since the official wiki currently doesn't accept attachments from unwashed strangers such as myself ;-) (Hmmm... another good usecase for captchas...)

Aug 01, 2006

Ouch

Filed Under:

From the Bad-Hair-Day-Department

Man, I'm frustrated... while getting a client's project ready for deployment I noticed that performance on the production server was dismal and went about debugging when I realized that the CPU-hog wasn't the new project but... the Zope instance serving tomster.org...!

Its ZODB had grown to over 2.2Gb in size (eventhough the site doesn't contain more than ca. 300Mb actual data) and every click on it sent the CPU usage up to 100%. I decided to export the content and set up a new instance to alleviate the performance problem.

No dice! The attempt to export the plone instance to a .zexp causes the zope process to crash after ca. a minute. So does the attempt to compact the database. And... in the attempt to export each top-level folders of the site on its own so did the attempt to export my blog.

At the moment I don't have any time or energy to pursue the matter any further, as the aforementioned client project clearly takes prority.

At least now with the new instance the performance seems to be back to normal again...