Entries for month: June 2009

How do you edit a 862 MB Text File on a Mac?

Right... so I have this large large large text file. 862 MB. And I wanted to change the first few lines on it.

First I tried the usual editors... BBEdit, Coda, TextMate, TextWrangler etc. All crashed and burned.

Read more...

SES URLs in MangoBlog on Tomcat

My live blog site runs on ColdFusion (using JRun) with the SES servlet mappings in web.xml. I use the excellent MangoBlog engine for powering my blog. All this means that I have pretty-ish URLs like http://nagpals.com/blog/post.cfm/ftp-in-eclipse-hooray.

Today I wanted to run a copy of my blog on a dev box. But on that dev box, I chose to use JBoss-Tomcat. And the SES servlet mappings that work in ColdFusion on JRun, do NOT work on ColdFusion on Tomcat-JBoss as they are not supported by the servlet engine.

To get around it, I simply used Apache-based rewrites so that the SES urls like http://nagpals.com/blog/post.cfm/ftp-in-eclipse-hooray automatically get mapped to http://nagpals.com/blog/post.cfm?entry=ftp-in-eclipse-hooray.

Here are the rewrites that I put in place to get posts, categories, pages and search to work.

Read more...

Apache Configuration Language Module for Coda

After my last post on FTP in Eclipse, I started using Coda as an alternative editor for CFML. Must say that it is one of the nicest applications that I've used (sorry Windows users, it is a Mac only app).

It support CFML code completion, snippets and syntax highlighting. Very quick and easy to use.

In fact, I switched all text files to open in Coda. It is quite extensible and provides quite a few language modules for syntax highlighting and code completion.

Since I'm usually twiddling with Apache conf files, I found an Apache language module (http://www.codingmonkeys.de/subethaedit/modes.html). However, that module is quite old... it was last updated in 2004.

So, I decided to spend a little time and bring it up to date. It now supports all directives and keywords up to Apache 2.2.

Read more...