So…use webalizer and discover that its “agent’ (browser) field is actually just too small?


edit webalizer.h, change
#define MAXAGENT 1024 // changed to bigger…arg!                    /* Max user agent field size        */


how to write email in php

Use the default “mail” command, but make sure you include a “from” address in the last parameter!

// The message
$message = "Line 1nLine 2nLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
mail('rogerpack@gmail.com', 'My Subject', $message, "From: r@r.com");
// Send
//mail("rogerpack2005@gmail.com", "sub", "msg")
// mailx -s "subject" paulr@onebetter.com

ruby sockets

Find that your ruby process with sockets and threads suddenly…stops mid-thread?  Make sure you aren’t killing it (inadvertently) via some other thread (like thread.kill).
Have problems connecting to localhost (connection reset by peer, even before you receive the last packet?) — sleep 1 after sending the last packet and the receiving end on localhost will get it [ugh].

Ruby exceptions

So…say you have some exceptions that are thrown in ruby that ‘by pass their bounds’–they just seem to mysteriously ‘skip’ their rescue blocks.  Examine them carefully to make sure they don’t “not inherit from standarderror” as rescue => detail ONLY captures StandardError, so they may not!

Another tip: getting “permission denied” to delete files in ruby? Make sure some other thread does not have them open!

using puttygen with cygwin

So…say you’re using svn within cygwin.  It doesn’t pick up and use your key pairs that are running with your putty agent, unfortunately.  So what you’ll need to do is setup an agent on the cygwin side, and give it the same keys.  Or, the easy way, save your private key to the ~/.ssh/identity file.  Right click your private key, choose edit, then choose “conversions”, choose save as openssh keypair, then navigate to c:\cygwin\home\username\.ssh (create if necessary), and save it to the file “identity.” Voila.

Roger's meanderings, notes to himself, bug reports, and other things