This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

Paul's Time Sink

| Main | Albums |

Bad Behavior

Paul Westbrook | 15 March, 2006 01:54

This past weekend, I had a flood of over 100,000 of attempted comment spams.  The bayesian filter stopped all but 5 from getting through.  The main effect that I noticed was that the database queries to run these spam check was hitting the database hard.

Bad Behavior is a collection of php scripts that is intended to stop these http accesses before the queries reach the database.  It analyzes the actual HTTP request and compares it to profiles from known spambots.

I was able to get this to work easily in LifeType.  Here is a version of the php file to be included, that allows logging of these accesses into the LifeType database.

Technorati Tags: , ,

Map of email

Paul Westbrook | 14 March, 2006 20:15

Butter Fat is a site that will map out the path of an email on Google Maps.  It takes the headers of the email message and maps the servers that it travels through.

Here is an example map for one of the email messages that I have received:

Email Map

[via Hawk Wings]

Technorati Tags: , ,

Talkdigger

Paul Westbrook | 12 March, 2006 20:32

I just heard of Talkdigger on the latest Geek News Central podcast.  This is a site that will aggregate the results from various sites that track referrals.  For example, this url will run a query to show all of the sites that link to this blog.

In addition to the standard html results page, the results can be formatted in a rss feed, so you can see the new referrals in your rss aggregator.

Technorati Tags:

Iconic Fast User switching

Paul Westbrook | 12 March, 2006 20:03

A while ago, I wrote about WinSwitch, which adds the ability to have the Fast User switching menu be an icon, instead of the full name.  The version of WinSwitch stopped working for me with Mac OS X 10.4.5, so I wanted to see what options are now built-in to the OS.

Login OptionsThe Login Options of the Accounts preference panel now has the option to change what is displayed in the menu bar for the Fast user switching menu item.  I am not sure when this was added to the OS.

Technorati Tags: , ,

Paparazzi!

Paul Westbrook | 11 March, 2006 15:39

Some times I have wanted to take a snap shot of a web page. You can do a Print Preview of the page, and create a pdf from this, but this splits the web page by page break.  In addition, often browsers will put a header or footer on the page when printing.

Paparazzi! is an application that renders a web page, and allows you to save the the image in various formats.  It looks like it uses Apple's WebKit to render the html, so the resulting graphic will look like the pages do in Safari.  This may look different than the page does when rendered in Firefox.

[via Hawk Wings]

Technorati Tags: ,

HDMI switcher

Paul Westbrook | 10 March, 2006 21:25

Hdmi-Switch-3Port-3DWe have decided to replace our Toshiba DVD Recorder with TiVo with a Intel Core Duo Mac mini.  We don't have a video source connected to it, so it is only used for playing DVDs and listening to our music collection.

I want to connect the Mac mini to our TV though DVI, but our TV only has one HDMI connection.  So a while ago, I saw this post  that mentioned a 2-port HDMI switcher, for less than $100.  Unfortunately, it looks like this has been discontinued.

I then did another search, and I found the Octavia 2-port HDMI switch.  It has discrete codes for switching the inputs, so it should be really easy to integrate this with my Harmony 880.

Technorati Tags: , ,

regular expressions in Cocoa

Paul Westbrook | 09 March, 2006 22:19

I don't get why program languages don't include regular expression support, either built in or as one of the included libraries.

I wanted to parse some html in Objective-C to find the url for an image.  Ideally, I want to use this expression to find an image url:

img src=\"([^\"]+)\"

Objective-C and Apple's libraries do not include any regular expression support.  I found the OgreKit framework that adds this support. 

Unfortunately, all of the documentation is in Japanese.  And, I wasn't able to correctly embed this framework in my project.  I just ended up searching for the url manually.

Technorati Tags: , , , ,

endo

Paul Westbrook | 09 March, 2006 21:42

EnoThe author of ecto has come out with a new RSS aggregator.  endo is a pretty cool application, and it does have some differences that the standard RSS reader.  Instead of having the feed groups listed on the left side, the groups appear across the top of the window.  When you select one of the groups, it slides to the middle of the window, and the others move out of the way.

In addition, it has a pretty good download manager.  It natively support torrent files, using the MIT licensed Transmission BitTorrent client code.  Also, the endo application has built-in updating code, so when an update is needed, it downloads and installs it itself, instead of using a browser.
 (More)

iPod USB Retractable cable

Paul Westbrook | 05 March, 2006 02:11

El-IuaApple has a created a huge racket with their iPod.  When you buy an iPod for $300-$400, it comes with a USB cable.  But if you want a dock, you will have to pay about $40 for the Universal Dock.  If you want to use this dock on a different computer than where you have connected the iPod included cable, you will have to get another $20 cable since the Universal Dock doesn't come with a cable.

I didn't want to pay $20 for this cable, so when I was at Fry's, I saw this $10 retractable iPod cable from Macsense.  It works perfectly.  (In fact, the dock connector itself seems to grip the iPod better.)  I can imagine that this cable could break before the Apple one would, as there are moving parts in the retracting mechanism.

Technorati Tags: , ,

rendering images in Cocoa

Paul Westbrook | 05 March, 2006 00:51

I was having a problem getting image files to render in Cocoa, using Objective-C.  Here is the code that works for me:

    NSString *shortPath = @"~/Desktop/DCP_4146.JPG";
    NSString *absolutePath = [shortPath stringByExpandingTildeInPath];
    NSImage *image = [[NSImage alloc] initWithContentsOfFile: absolutePath];
    
    NSSize imgSize;
    NSRect dstRect;
    NSRect imgRect;
    
    // how much room do we have to play in?
    NSRect bounds = [self bounds];
    
    imgSize = [image size];

    // Should really be a while loop to scale down truly huge pictures
    dstRect.size.width = imgSize.width;
    dstRect.size.height = imgSize.height;
    
    imgRect = NSMakeRect(0, 0, imgSize.width, imgSize.height);

    [image drawInRect:dstRect fromRect:imgRect operation:NSCompositeSourceOver fraction:1.0];
    

Technorati Tags: ,

iPod media centers

Paul Westbrook | 04 March, 2006 00:15

The latest iPods seem to have all of the capabilities of a media center.  In addition to Apple's Universal iPod dock, some third party companies have come out with some cool docks that have nice interfaces.

Homedoc Dx Hero Med  Prod Tunecenter Main-1

The HomeDock Deluxe and the TuneCenter allow you to play your audio, video and photo content on your TV.  Each of these presents a interface that is designed for the TV.  One feature that the TuneCenter has, is that it will play Internet Radio stations.

Technorati Tags: , ,

eNook

Paul Westbrook | 03 March, 2006 23:45

EnookI was looking through the latest MacWorld magazine and I saw an advertisement for the eNook.  This is a wall mounted piece of furniture that is meant to keep and plug in all of your little electronic devices, like  your cellphone or iPod.  In addition, you can keep a laptop in there, and when you open the eNook, it can become a desk.

I could see using one of these, but if we did, I would want to install a power outlet right behind the eNook, so the power cord would not be dangling beneath.

Technorati Tags:

SmartDeck

Paul Westbrook | 03 March, 2006 23:15

Prod Smartdeckdock MainUntil I get a new head unit, I was thinking about buying the SmartDeck, since my head unit doesn't have a line input, but it does have a cassette deck.  This is a cassette deck adapter for an iPod with a Dock connector.  It allows the cassette player controls to be used to control the iPod itself.  This is a pretty inexpensive way to get an iPod connected to a car stereo, and should sound better than the FM transmitters.

Technorati Tags: ,

Mac mini and HD resolutions

Paul Westbrook | 03 March, 2006 22:35

HdoutputHD Beat has a post that describes the resolutions that are supported in the new Intel Macs.  It looks like the new Macs determine the resolutions supported by TVs with EDID.  The thing that I find most interesting is that these Macs support interlaced resolutions.  This is the first time that I have seen PCs support non-progressive resolutions.

Technorati Tags: ,

Spam Cube

Paul Westbrook | 03 March, 2006 16:45

SpamcubeI saw this post about the Spam Cube, and I am not sure what to think.  In order to get this to work, you connect it in-between your computer (or router for multiple computers) and your DSL/Cable modem.

It seems like it looks at all of the packets that go over ports 110 (POP3) and 143 (IMAP).  Then it probably works in one of two ways.

  1. It looks at each message as it is downloaded, and modifies it if it is spam
  2. It implements a mail server, and then becomes the client to the specified server.  So when you think that you are connecting with an external server, you actually are just connnecting witht he Spam Cube.  Then the Spam Cube connects with the external mail server.

 (More)

Powered by LifeType
Design by Book of Styles