Thursday, January 29, 2004

Substituting Gecko for MSHTML

Something I've pondered since switching to Firebird as my desktop browser is, "Wouldn't it be great to use the same engine as Firebird, as an alternative to the MSHTML engine, to render HTML in my applications?"

It appears Adam Lock had the same idea, and did something about it. The Mozilla ActiveX Control aims to be a (nearly) drop in replacement for the MSHTML interface.

Replace a string over a directory tree...

I received this tip from a coworker of mine, John Sutherland. Ever need to search and replace a string over a directory tree?

find . -name '*.html' -exec perl -pi -e 's/old text/new text/g' {} \;

Saturday, January 24, 2004

Xen and the Art of C# Query Programming

Microsoft has apparently publicized a research effort to combine XML and relational queries into an extension to C#, called Xen. Read the article on Extreme Tech.

Xen looks promising: It simplifies many common business logic operations that generally create code readability (and security) headaches.

From the article: Including XML constructs in the language will make programming Web services easier and should result in greater type-safety as well as increased code optimization--since the compiler will have intimate knowledge of the XML data structures and the functionality used to manipulate them.

BTW, this item was pulled from The Server Side .NET, a new community resource for .NET development, sponsored by a number of big name Microsoft-technology players (including Microsoft). I'll likely be pulling more information from that site in the future.

Friday, January 16, 2004

Relaying mail to a remote MTA with Qmail...

Up to now, I've sent email through my LAN's MTA, which uses the IP of my cable modem. Lately, it seems, there is a growing number of exchanges (such as AOL.COM) that no longer accept mail from these "dynamic" addresses. So, I needed a way to relay mail from my LAN's MTA to an alternate MTA that uses a static IP address.

To do this, I first had to add the IP address of my MTA to the remote MTA (with the static IP address) as an authorized relay. See the qmail faq for more information.

Next, I had to tell my local MTA to relay mail to the remote MTA. This is accomplished through the qmail/control/smtproutes file (see qmail-remote(8) for more information). Here is how I set it up:

localdomain.com:
:mail.remote.com


(Since I use my local MTA as a mail exchanger for localdomain.com, I added an entry here to allow messages to that domain to be delivered normally.)

All other email (mostly from my desktop) is relayed to mail.remote.com, which in turn relays it to the appropriate destination.

Now, email to addresses whose exchangers had previously denied my email is accepted.

Sunday, January 04, 2004

An Outlook-style Calendar: Month Control

I've written an Outlook-style month control in C# for public consumption. It's in its infancy. Please let me know if you make any improvements.

Here's a screenshot:



Click here to download

A Simple C# Logging Class...

I've written a simple, flat file, syslog style, thread safe logging class in C# for public consumption. Please let me know if you make any improvements.

Click here to download