Recent Posts

  • No articles at the moment



fasttext is a FastCGI server, written in C, that takes parameters on the HTTP query string and renders text into a transparent png that it serves back through the webserver. It uses Cairo2 with Freetype, supports TrueType font files, and is about as fast as reasonably possible, the bottleneck in rendering being the png compression. It is intended to be used behind a caching web server or proxy, but can be used directly for low-traffic sites. Here's an example:

Continue Reading...

Sometimes you just need a good, simple hex dumper. Like I had a need for a quick-and-dirty hex dumper that I could cut and paste into a shell for those machines that don't have one installed by default but do have a Perl interpreter (OpenBSD, for example). Its output is similar to "hexdump -C myfile" in BSD Unix:

00000000 00000000    23 21 2f 75 73 72 2f 62 69 6e 2f 70 65 72 6c 0a    |  #!/usr/bin/perl.  |
00000016 00000010    0a 24 42 59 54 45 53 5f 50 45 52 5f 4c 49 4e 45    |  .$BYTES_PER_LINE  |
00000032 00000020    20 3d 20 31 36 3b 0a 23 20 30 30 30 30 30 30 30    |   = 16;.# 0000000  |
00000048 00000030    30 20 30 30 30 30 30 30 30 30 20 20 20 20 32 33    |  0 00000000    23  |
00000064 00000040    20 32 31 20 32 66 20 37 35 20 37 33 20 37 32 20    |   21 2f 75 73 72   |
00000080 00000050    32 66 20 36 32 20 36 39 20 36 65 20 32 66 20 37    |  2f 62 69 6e 2f 7  |

That's the address in dec, the address in hex, the bytes in hex, and the corresponding ascii characters. The code is simple and very easy to alter to fit your needs (probably easier than writing a formatting spec for the BSD "hexdump".)

The code is HERE. Enjoy.

DIY Home Theater Screen

I bought my first projector from a NASA surplus auction in Spring of 2000, an old Electrohome ECP-2000. It was a joint bid with my good friend Ethan O'Toole of 757 Labs, who knew a lot more about old school CRT projectors than I did. This was a few years before affordable LCD projectors became available. To be able to watch movies or play games with an 8' image in your home was a pretty novel experience at the time. And incredibly fun!

Moving to New York and into my loft in Brooklyn meant that I could finally build a projection screen, so I combined the need for a screen with the need to segment my large loft space a little. So I built an 8' x 10' screen. :)

I had an idea for what I wanted to build, a metal frame with a single piece of fabric pulled tightly across it. I don't have much documentation or pictures of how it was built as I was largely winging it, except to say that it involved electric conduit, blackout fabric, grommets, and clothesline.

Continue Reading...

Shall we play a game? is an homage to the classic 1983 film, WarGames. It simulates the scene "Strobing Strategies" in which the Joshua AI, running on the WOPR computer, analyzes all possible strategies in a nuclear exchange in order to find the optimal first move. In another nod to the film, my version plays Tic-Tac-Toe instead of lobbing virtual missles.

The site was built as part of the application process for a development position at a high profile social networking site. It didn't get me the gig, but it's been a big hit amongst my friends and peers.

Continue Reading...

Ms. Pac-Man disassembly

Back in 2003 I started a project to disassemble and document the ROMs to Ms. Pac-Man. Since Ms. Pac-Man is a ROM overlay over the original Pac-Man ROM's, I started there. The methodology for the project has been to carefully walk through the disassembled code manually and document it, often with printouts and pencil. I'm avoiding using an emulator or anything other than simple disassembly tools that I write. I've work on it on the occasional weekend, lunch break...... really whenever I need to zen out into a piece of code. It's oddly relaxing to slowly scan through a piece of software and absorb its function from the bits-and-bytes level. It's probably my longest-standing project, and at this rate will be for some time to come. :)

Continue Reading...

<< First < Previous [1 / 3] Next > Last >>