Fork me on GitHub

Author Archive

OpenTN3270

OpenTN3270 is a free terminal emulator for connecting to mainframes that support IBM 3270 terminals. Major features include basic colors, adjustable screen and font sizes, and SSL support.

The emulator is a CLR library used by a front-end GUI. Source code for both is released under the GNU GPL.

More information (including source code and binary downloads) will come soon. This page is here to remind me.

FUSE Extension for PHP

Well, it’s official… I’m a geek. A few weeks ago I started writing an extension for the PHP runtime that provides bindings to libfuse. Back up a few months— I wrote a PHP script to screen-scrape the Trac web interface and allow me to grab source code to a project I’m working on.

My solution worked but it was pretty ugly. So I wondered if it would be better to implement a FUSE file system to do the same task. Unfortunately PHP didn’t have bindings for libfuse at the time. After several failed attempts at using SWIG to automagically generate an extension, I came to the harsh realization that if I wanted FUSE bindings I’d have to do it myself. I mean… how hard could it be?

It actually wasn’t too bad. I read a bunch of non-existent documentation on the Zend API and went to work on a prototype. It took me about a week, but I now have a working PHP extension. I’ve also since implemented TracFS to replace my ugly script.

Continue reading »

TracFS

TracFS is a mountable POSIX virtual file system that allows you to read a Subversion repository through the Trac web interface. Why is this useful? It’s not… unless you can’t access the repository directly, but can see the files in the source browser. Using rsync (or a similar tool), you can maintain a local copy of the repository contents.

TracFS uses FUSE for VFS operations and is written in PHP. It also supports authenticating with a Shibboleth SSO gateway. Other authentication mechanisms can be easily added in the future.

Continue reading »

Building Amarok 1.4 on Leopard

I love Amarok and wanted to install it on my MacBook. With Qt4 on the horizon, it will be possible to run Amarok natively in OS X without an X server. But I didn’t want to wait for Amarok2 to become stable, so I looked into compiling Amarok 1.4 and running it under X.

I tried following the On OS X guide with limited success. Apparently, ffmpeg won’t compile on Leopard and that caused the entire libxine compilation to fail. I tried various combinations of configure flags, but none seemed to help. I looked at the source to try and fix it, but unfortunately I’m not terribly familiar with x86 assembly.

Continue reading »

Custom Draw ListView with Double Buffering

For one of my pet projects, I needed to add a graphic to certain ListView rows. I considered owner-drawing the control, but that seemed messy. What I really wanted was a way to draw on top of whatever Windows painted. I couldn’t find a nifty .NET way to do this, so remembering a technique from the MFC days, I decided to custom draw the ListView. This would let me inject my own drawing code and let Windows handle the rest. Perfect!

I had originally implemented the ListView using a control style to eliminate the annoying flicker every time the list was repainted. Once I started custom drawing the control, I saw odd artifacts in the ListView’s client area when I scrolled or moved the mouse. If I turned off double buffering, it worked fine.

Continue reading »