You are currently looking at an older section of the wincent.dev website.
Please check the new version of the site at https://wincent.dev/ for updated content.

wincent knowledge base

August 17, 2006

Knowledge base in wiki format

The current knowledge base format (chronological posts, categorized, like a weblog) has always been somewhat limiting. I have recently started a new, wiki-based knowledge base. It's still very much a work in progress, but for the curious it can be found at:

https://wincent.dev/wiki/

More Meta articles

Posted by wincent at 4:54 PM

June 21, 2006

Clamping down on spam

I run SpamAssassin on my mail server (anti-spam). I also run ClamAV (anti-virus). After extensively trialing ClamAV I was convinced of its reliability and decided to have it automatically delete all detected incoming viruses. SpamAssassin still produces far too many false positives and false negatives for me to perform such deletion but I decided today that I wanted to tighten things up a little bit.

Read full article

More UNIX articles

Posted by wincent at 3:40 PM

June 10, 2006

freshclam: "Problem with internal logger"

Yesterday I received notification that an hourly freshclam update had failed on my Red Hat Enterprise Linux box. Overnight I continued to receive hourly notifications, each saying the following:

/etc/cron.hourly/freshclam:

ERROR: Problem with internal logger.

I found the explanation here: that there was a hung freshclam process lingering on the system.

Read full article

More UNIX articles

Posted by wincent at 3:25 PM

June 2, 2006

WordPress security tip

Add the following to the .htaccess file at the top level of your WordPress install:

<FilesMatch ^wp-config.php$>
deny from all
</FilesMatch>

This will make it harder for your database username and password to fall into the wrong hands in the event of a server problem. Better still would be to move the username and password outside of the document root entirely and include or require it but that would require you to turn off PHP Safe Mode and/or the open_basedir restriction, which I don't recommend with a product like WordPress which is both popular and has a less-than-perfect security record.

More Web articles

Posted by wincent at 6:55 PM

WordPress updates via Subversion

I don't run WordPress on this website, but I do run it elsewhere. Here are some notes I made while streamlining the process of performing WordPress upgrades by using Subversion to pull down updates and merge them automatically. This is a technique already used by successful projects like Bugzilla and MediaWiki. The WordPress folks aren't quite with the times yet (they haven't managed to tag the last two releases in the repository, but you can follow the 2.0 branch instead of following tagged releases instead).

Read full article

More Shell articles , More Web articles

Posted by wincent at 6:41 PM

Intel iMac set-up notes

When I switched from the G5 to the Intel iMac I used Apple's migration assistant to transfer over as much data as possible from the old system to the new.

There were a number of command-line tools that I depend on that did not get transferred by the migration assistant. These are the notes that I made while compiling native Intel versions of these tools and installing them on the iMac.

Read full article

More Shell articles , More UNIX articles

Posted by wincent at 4:20 AM

June 1, 2006

Subversion 1.3.1 to 1.3.2 upgrade notes

Here are some brief notes I made while performing the upgrade from Subversion 1.3.1 to version 1.3.2 on my Red Hat Enterprise Linux ES 3 machine.

Read full article

More Development articles , More Shell articles , More UNIX articles

Posted by wincent at 3:15 PM

Upgrading to MySQL 4.1.20 on Red Hat Enterprise Linux 3

It's amazing how quick and painless it is to upgrade from MySQL 4.1.19 to version 4.1.20 on Red Hat Enterprise Linux 3.

Read full article

More UNIX articles

Posted by wincent at 1:44 AM

May 31, 2006

SSH tunneling and secure IMAP, POP3 and SMTP

During the time in which I was totally without Internet access last week I used iStumbler to see if there were any open, public wireless networks around which I could use to get on the Net.

Turns out that there was one which was occasionally available, but with a very weak signal and I could only ever get a pitiful few bytes per second over it.

When I first found this network I foolishly decided to check my email despite the fact that it uses inherently insecure protocols which transmit usernames and passwords in plaintext. I realized that the person running this open network could easily snoop them, so I decided to log into my server securely via SSH, immediately change the email passwords that had been transmitted as plaintext, and not try checking my email again until I had worked out a way to secure the protocols.

Read full article

More Shell articles , More UNIX articles

Posted by wincent at 8:17 PM

May 29, 2006

pstree mirror

I was just trying to build a copy of pstree for Intel and it appears that the website is no more. Not sure if this is a temporary outage or a permanent issue. Luckily I had a copy of the source archive, the latest version as far as I know (2.27). Seeing as the software is licensed for distribution under the GPL I've mirrored a copy here.

More Shell articles , More UNIX articles

Posted by wincent at 3:26 PM

April 5, 2006

Subversion 1.3.1 upgrade notes

Here are some brief notes I made while doing the Subversion upgrade from version 1.3 to 1.3.1:

Read full article

More Development articles , More UNIX articles

Posted by wincent at 3:52 PM

March 9, 2006

Eliminating "X-Authentication-Warning" headers from Squirrelmail

So I just upgraded my Squirrelmail installation to the latest stable release (1.4.6). While I was at it I decided to see if I could eliminate the annoying "X-Authentication-Warning" headers that were being added to outgoing mail sent using Squirrelmail. I wanted to eliminate this because it's possible that strict spam filters might reject messages with this header; also the warnings were cluttering up my LogWatch reports with noise.

Read full article

More UNIX articles

Posted by wincent at 2:04 PM

March 1, 2006

Avoiding protocol-related warnings

By default, GCC warns when a subclass is marked as adopting a protocol and it inherits protocol methods from its superclass rather than implementing them itself.

Read full article

More Development articles

Posted by wincent at 2:16 PM

February 13, 2006

Unit testing guidelines

Lately I've been spending a lot of time working on my unit testing framework, WOTest. In doing so I've had cause to think about unit testing "best practice", or at least what works best for me. In this article I summarize the guidelines that I've come up with that help me decide when, how and where to write unit tests:

  1. Write unit tests at all levels of your implementation
  2. Test your assumptions
  3. Base your unit tests on your documentation
  4. Base your unit tests on your code
  5. Base your unit tests on your expected results
  6. Write unit tests for your bugs

Read full article

More Cocoa and Objective-C articles , More Development articles

Posted by wincent at 2:38 AM

January 27, 2006

Lightweight issue tracking

I use Bugzilla to power my public feature requests and bug tracking database. But sometimes when I am writing code I want to quickly insert a reminder into the source code itself rather than opening an issue in the database. Rather than keeping a separate "TODO" list I just write a comment in the code like this:

// TODO: add user preference for opacity

If I later want to find all of the TODO items I can use Xcode's "Find In Project..." functionality or I can grep from the command-line. For this purpose I have the following function defined in my ~/.bash_profile:

Read full article

More Development articles , More UNIX articles

Posted by wincent at 2:23 PM