El Rancho San Benito Community Resource Website
San Benito County Community Resource Website

--Paul McNett, Earthling
Home
XML

Revert Trac Spam Comments and Ticket Changes - Jul 12, 2007 14:14
Trac is an excellent issue tracker and wiki used by many open source projects
for efficient collaboration. We use it in our Dabo project, to keep track of
open issues, provide a place for people to browse our source code, and the 
like.

One of the nicest features is the simplicity of it all, including the ticket
submission process. You don't need to log in to submit a new ticket or to 
comment on an existing one. 

However, that openness is also a vulnerability, and spammers are starting to
experiment with posting crap comments in our Trac instances. I don't really 
want to lock down the submission of tickets to only authenticated users,
because that just doesn't jive with my worldview that the Internet should be
open, loving, and caring. :)  Not to mention efficient and non-annoying.

So, I tweaked the spam filters a bit. But more importantly, I wrote a little
utility to help weed out changes that should never have been applied. I call
the tool trac_revert_ticket_changes.py. You put it in your filesystem alonside
your Trac instances, and then issue commands like:

  # Review changes within last 10 days:
  trac_revert_ticket_changes.py -n 10 dabo

  # Review explicit tickets:
  trac_revert_ticket_changes.py dabo 1002 1004

For each ticket in the set, the most recent change will be shown, and you'll
be asked if you want to revert the change. Answer no, and we'll move on to the
next ticket. Answer yes, and the change will be reverted, and you'll get to 
choose to revert the next most recent change.

I was able to remove about 30 spammed ticket changes within just a few minutes
with this tool, and figured others may benefit from it, too.

Download from here:
http://paulmcnett.com/pkm_software/trac_revert_ticket_changes.py
Enjoy!
  

© 2007 Paul McNett       [/Computing/Python] permanent link


Email Signatures Of The Times - May 17, 2007 22:59
So I called my accountant today, to ask if he could sign a form for me so 
I could become a CACert assurer - no biggie, right? All I needed was to 
find two notaries, bank managers, or accountants to vouch that I am who
I say I am. And I got a simple, reasonable answer.

Well, okay. I didn't call, I emailed. You think that if I had called, I
would have gotten a lengthy diatribe about who the call was intended for, 
and what the potential tax implications were, and instructions to destroy
the record of the call if I wasn't who I said I was?? 

Sheesh! Where I come from, having an email signature greater than 4 lines
is sacrilege. I don't think I've ever clocked in more than 3, and I'm 
pretty gosh-darned important, aren't I? Aren't I? :) 

The sig. clocks in at *42 lines*, versus 4 lines for the actual message.
The phone call would have involved some friendly chit-chat, but the email
had me hit over the head with legal bullshit. No wonder Mother Earth is 
in danger: we keep wasting bytes like this and we'll drown in rising sea 
levels of our own making! (Note to lawyers and accountants: I'm *joking*. 
Lighten up, will you?)

Not to mention the public ip address from the Windows workstation, and 
the choice of email client. Outlook Express? Wasn't that banned by 
Homeland Security back in 2002? :)

Check it out, Sid (names obfuscated to protect the innocent):
"""
Return-Path: <_______@blhhcpa.com>
X-Original-To: p@ulmcnett.com
Delivered-To: paul@paulmcnett.com
Received: from localhost (localhost [127.0.0.1])
	by mail.paulmcnett.com (Postfix) with ESMTP id 9313971005B
	for ; Thu, 17 May 2007 18:42:22 -0700 (PDT)
Received: from mail.paulmcnett.com ([127.0.0.1])
	by localhost (mail.paulmcnett.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Sw11S1yk8IxR for ;
	Thu, 17 May 2007 18:42:22 -0700 (PDT)
X-Greylist: delayed 912 seconds by postgrey-1.27 at sg23; Thu, 17 May 2007 18:42:22 PDT
Received: from newmail.garlic.com (oahu.garlic.com [216.139.32.181])
	by mail.paulmcnett.com (Postfix) with ESMTP id 71E9871005A
	for ; Thu, 17 May 2007 18:42:22 -0700 (PDT)
Received: from C26 (unverified [216.139.4.50]) 
	by newmail.garlic.com (SurgeMail 3.6f5) with ESMTP id 213941 
	for ; Thu, 17 May 2007 18:27:05 -0700
Message-ID: <000e01c798eb$24b70860$1a65a8c0@C26>
From: "______ _. ______" <_______@blhhcpa.com>
To: "Paul McNett" 
References: <464CF8B1.8060500@ulmcnett.com>
Subject: Re: Notary service
Date: Thu, 17 May 2007 18:23:30 -0700
Organization: Bianchi, Lorincz, Huey, Hudson & Co., LLP
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
Disposition-Notification-To: "______ _. ______" <_______@blhhcpa.com>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Server: High Performance Mail Server - http://surgemail.com r=-1999256347

Hi Paul,

Both Barbara S & Christine are Notaries, so you can come in anytime and have
one of them notarize your papers at no charge.




______ _.______, Managing Partner
CTEC Registered Tax Preparer (CRTP)
_______@blhhcpa.com

(831) 638-2111 - Hollister
(831) 373-1697 - Monterey
(408) 778-2112 - Morgan Hill

Bianchi, Lorincz, Huey, Hudson & Company CPA's
A Business Consulting Firm
"a member of the Moss Adams LLP Network of Independent CPA firms"

****************************************************************************
*****************
Notice of Confidentiality:  This transmission constitutes an electronic
communication within the meaning of the Electronic Commissions Privacy Act,
18 U.S.C. 2510, and its disclosure is strictly limited to the recipient
intended by the sender of this message, together with any attachments.  This
communication, including any attachments, may contain confidential and
privileged material for the sole use of the intended individual or entity,
and receipt by any party other than the intended recipient does not
constitute a loss of the confidential or privileged nature of the
communication.

Any review or distribution by others is prohibited:  If you are not the
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this message, or any attachment, is strictly
prohibited.  If you have received this message in error, please notify the
original sender immediately by telephone or by return E-mail and delete this
message, along with any attachments, from your computer.

IRS Circular 230 Disclosure:  Although this written communication may
address certain tax issues, it is not intended to be used, and it cannot be
used by any taxpayer, for the purpose of (i) avoiding penalties that may be
imposed on the taxpayer or (ii) promoting, marketing, or recommending to
another party any matters addressed herein.  Only a ‘covered opinion’, which
would involve much more extensive analysis of the taxpayer’s particular
circumstances and applicable law than that provided here, could afford such
protection.  If you would like to receive a ‘covered opinion’ letter, please
contact us and we will discuss the cost of preparing one.
****************************************************************************
*****************

----- Original Message -----
From: "Paul McNett" 
To: <_______@pcs-blc.com>
Sent: Thursday, May 17, 2007 5:52 PM
Subject: Notary service


> Hi _______,
>
> I have a form that needs a notary or accountant's signature that you
> affirm I am who I say I am... would you mind signing it? The whole
> procedure will take a couple minutes... just let me know when to show up
> at your office.
>
> Thanks in advance!
> Paul
>
> --
> pkm ~ http://paulmcnett.com


"""

© 2007 Paul McNett       [/Computing] permanent link


MacBook, Please Stay Awake When Your Lid Closes: A Proposal For Apple - Mar 23, 2007 11:12
A few weeks back I purchased a black MacBook 2GB model, and I'm hooked. This
is the best computer I've ever owned, bar none. And mostly, it does what it
should do. However, there is one major annoyance:

The friggin' computer always wants to go to sleep by merely closing 
the lid!. 

I've spent more time than I care to admit trying to futz with the preferences,
grepping source code, and googling around for answers. I even called 
AppleCare and opened a ticket, but the response was basically: "Apple 
designed it this way, live with it, trust us we are smarter than you."

Ok, why do I want this so badly?

1) When I want to relocate down the hall, I want to close the lid, tuck
   the computer under my arm, and gather my water bottle and other things
   to carry in my hands. Having to walk with the screen open gives me less
   cargo room, and makes it more likely that I'll drop the computer on the
   way. Putting the computer to sleep only to have to wake it in a minute 
   sucks, because I may have missed some IRC messages, and iTunes has now 
   disconnected me from my internet radio site and now I have to reconnect.

2) When it is time to change the battery, I want to plug in the A/C, close
   the lid, turn the computer over, replace the battery, and get back to
   work as soon as possible. Having to deal with waking up from sleep after
   this 20-second battery-change procedure is, frankly, frustrating. 

Okay, there are other reasons, such as wanting my computer to stay awake
while compiling a program, while I stuff my computer in my backpack, get on
my bike, and ride downtown to the Main Street Bistro, but this use-case 
probably borders on why Apple hasn't given us the ability to set our MacBooks
to stay awake in the first place.

Why Apple Won't Give us a no-sleep-on-lid-closed Feature

I believe the major reason has to do with the apparent fact that much of
the cooling system relies on a free-flow of air around the keys in the 
keyboard and out into the room. When the lid is closed, the potential of 
heat buildup causing damage to the LCD, not to mention CPU, increases.

Therefore (if my assumption is correct), I actually agree with Apple that
they can't just allow the lid to shut and the computer to stay awake, as
that would result in lawsuits, recalls, and public humiliation, and Apple
just won't have that.

Plus, if people could use their laptops to run server processes uninterrupted,
why would they need XServe?

My Proposed Solution

Allow for my 2 use-cases, which involve the computer staying awake for a 
very short period of time with the lid closed. Apple, you've presumably done
the testing already: what is the maximum time the lid can stay closed when 
the computer is awake and doing lots of processing? Take 3/4 of that number
(in other words, if 12 minutes is the danger limit, make it 8 minutes), and
then give us a preference to "Keep Computer Awake for x minutes" after lid
is closed. Default that preference to 0, of course, but allow us to set it
up to that limit. I'd be a happy camper, because I wouldn't feel like I'm
fighting someone else's idea of elegance.

Oh, and while I'm ranting: why the !^%#^# is there no available external
battery charger? 

© 2007 Paul McNett       [/Computing] permanent link


Still Waiting... - Feb 10, 2007 14:41
I have my music collection on a raid mirror in my G4, total size of about
half a terabyte. I noticed my system running really slow, so I finally 
decided to swap the system drive and reinstall OS X Tiger. When I started
the install on the new drive, I heard my mirrored music drives active,
so I started disk utility and got a message that the raid mirror was 
rebuilding, and that it would be about 2 hours. 45 minutes later, it 
still said it would be about 2 hours. A little bit after that, it said
"about 1 hour, 45 minutes". 

Well, I didn't really want to install OS X knowing that the RAID 
rebuilding was happening under the covers, so I went to sleep, and woke
up when it said "about a minute remaining". As I watched, it flipped 
from:

Estimated time left in rebuild: 1 minute

to:

Estimated time left in rebuild: 1193046 hours.



If my math is right, that's approximately 136 years. I let it chug along
for another hour, and when the dialog never changed, I powered the system
down, restarted the installation, and then when OS X was installed and
all the latest updates applied, I issued "diskutil checkraid" and kept
an eye on that. In about 3 hours, I had a healthy mirrored set again.

Kind of funny, these dialogs that try to be smart!

© 2007 Paul McNett       [/Computing] permanent link


Stupid Dialog From Kerio Mail Server - Oct 05, 2006 22:41
I just did a runaround with Kerio Mailserver. I thought I'd be smart and
upgrade from 6.1.4 to 6.2.2, so I did the download, used alien to convert
the rpm to deb, and installed the new version, and restarted the mail 
server. Of course, it wasn't as easy as that, because they renamed the 
package from kerio-mailserver to kerio-kms, but the short version is that
my mail server was down for over 20 minutes because -- surprise! -- my
license for 6.1 doesn't cover 6.2, and so the kerio mailserver services
were disabled. I tried going to the kerio website to purchase a newer 
license, but lo and behold that option is gone, replaced with a message
"please contact one of our partner resellers to purchase an upgrade."

Well, I'm sitting here with a disabled mail server, after hours, staring
at a list of resellers that mostly give out email addresses and phone
numbers instead of actual web addresses, just knowing it will be a couple
days before I actually have the needed license in my possession. I went 
through the entire list and only one site out of about 20 had an actual
online store. However, in order to see the available products to buy I
had to first email them to get a login. Oooh what a delicious waste of
time!

So, after re-downloading 6.1.4 and reinstalling it, I think I won't 
upgrade after all. And I'll post a dialog that strikes me as completely
stupid, and not just because of the grammar error: the program wants me
to downgrade my installed Qt library to the *exact version* required by
the kerio admin program. I guess they figured Linux could use some of
Window's DLL Hell?


© 2006 Paul McNett       [/Computing] permanent link


HOWTO: Enable Domain Literals With Kerio Mail Server - May 22, 2006 18:07
Here is how you can configure your Kerio mailserver to accept domain literals:

1) Open up kadmin, go to Domains, select your domain, click 'edit'. In the 
aliases tab, add an entry for your public ip address. This entry field won't 
let you enter the square brackets; don't worry about this yet, just enter the 
ip address.

2) Close the kadmin screen and apply your changes.

3) Using your command shell, navigate to your Kerio Mailserver application 
directory. Default for Linux is /opt/kerio/mailserver - I'm not sure about 
Windows or Mac.

4) Edit the file named mailserver.cfg. Search for your ip address alias 
entry. Make sure you are editing an entry that looks similar to:

<listitem>
<variable name="Domain">216.139.37.140
<variable name="Type">2
<variable name="Alias">paulmcnett.com

Simply change the "Domain" entry to add the square brackets. For example:

<listitem>
<variable name="Domain">[216.139.37.140]
<variable name="Type">2
<variable name="Alias">paulmcnett.com

5) Save the cfg file.

6) Restart Kerio Mailserver.

I tested this with Kerio Mailserver 6.1.3, and it is working fine. Until 
Kerio adds this automatically, at least we have this workaround.

© 2006 Paul McNett       [/Computing] permanent link


c3i3 Interactive Doesn't Pay - Apr 19, 2006 13:35
I did a quick job setting up a password-protected page for c3i3 Interactive
a couple months ago. It was only a $95 job but they never paid me. If you
are a contractor considering working for them, you may want to take my
experience with them into account.

On the whole, they seemed like great guys. Chris Jones knew he was asking
a lot for me to deliver the site mod basically overnight. He even went out
of his way telling me how to submit my invoice. The problem is, I submitted
it at least 3 times with no further response.

We independent consultants live and die by getting paid in a timely fashion.
This $95 is a comparative drop in the bucket next to everything else, but it
somehow bites harder than the $50K I was owed from a prior client that went
under because of the economy. 

© 2006 Paul McNett       [/Computing] permanent link


PyCon 2006 A Huge Success, and a big thanks to Andrew Kuchling - Mar 01, 2006 14:09
I just returned from the U.S. Python Conference, affectionately known as
PyCon 2006. This was the third PyCon I've attended, and by far the best.
A warm thank you to Andrew Kuchling and all the volunteers that made this
work.

If you are a Python user or developer, please come next year and meet your
fellows. And if your company uses and profits from Python's existence,
you really need to become a sponsor of the Python Software Foundation, to 
further the work of developing and marketing this excellent product.

Kudos to AMK and all the volunteers. See you again in 2007!

© 2006 Paul McNett       [/Computing/Programming/Python] permanent link


Dabo Report Designer Screencast, Part Two - Feb 17, 2006 06:53
I've posted a 10-minute followup screencast of the Report Designer which
follows up where I left off before. Enjoy!

http://leafe.com/screencasts/ReportDesignerOverviewPartTwo.html

© 2006 Paul McNett       [/Computing] permanent link


Dabo Report Designer Screencast - Feb 13, 2006 13:00
I've just put together a 23-minute overview of the Dabo Report Designer
in a screencast. It should give a good feel of Dabo's current capabilities
and design goals. Enjoy!

http://leafe.com/screencasts/ReportDesignerOverview.html

© 2006 Paul McNett       [/Computing] permanent link

Feel free to link to a story by using the 'permanent link' feature. Please do not reprint a substantial part of a story without permission. Please make sure to have some fun every day, because time keeps on ticking away.