Blocking spam referrers

I’ve noticed through my website statistics program (I use Mint, thankyouverymuch), and I’ve noticed a couple of referrers that are suddenly referring a ton of hit to my website. I as curious what I did to attract these guys, so I peeked in my Apache logs a bit, and headed over to their website to find out what they’re all about.  Turns out, they’re basically opening a little frame in their site, and redirecting browsers to hit Movable Type trackback posts.  Mind you, I haven’t run Movable Type in … 6 months?

Now, my Movable Type install doesn’t exist anymore, but I do have a rewrite rule in my Apache configuration to capture 404 (resource not found) errors and have WordPress deal with them.  This is so you get pretty website addresses for me, rather than something ugly with variable names in the website address.

I decided that I wanted to block these guys.  Not because they’re bothering me in any way — the trackback script they’re trying to hit on my server doesn’t exist anymore — but they are skewing my website statistics.

Warning: technology speak ahead.

I knew that I could solve this with mod_rewrite in Apache, but I never remember the conditionals and syntax of anything more than a very basic rule rewrite.  A bit of searching online led me to, who have already fixed this problem (and in a bigger way than I need to).  Basically, they use Apache’s mod_rewrite to forbid any request with a certain referrer field using RewriteCond and HTTP_REFERER variables.  I dropped the following two lines into my .htaccess, where I do the rest of my mod_rewrite work:

RewriteCond %{HTTP_REFERER} (tbsp2.php) [NC] 

RewriteRule .* - [F]

What does this do?  The first line checks the HTTP_REFERER variable, and if it contains tbsp2.php, it executes the next RewriteRule directive.  In my case, two different websites (who I will not link to), have a page called /klx/tbsp2.php with the aforementioned frame sketchiness going on.  The RewriteRule directive tells Apache to not redirect the client or do any rule rewriting.  The magic is in the [F] – this tells Apache to return a 403 Forbidden error.  These don’t get tracked into my Mint statistics, so they’ll no longer skew my stats.  And now, anytime I notice additional spamming referrers, I’ll just add another RewriteCond to my configuration.

And no, I haven’t been misspelling "referrer" through this.  For some reason, RFC2616 documents this as "referer", which is wrong.

Handy coffee reference manual

image Stumbled across this post from someone that’s created diagrams of different types of coffee.  Very handy, especially for those of us living in the pacific northwest, where there’s a Starbucks (or a Tully’s, or a Seattle’s Best Coffee [which is, in all actuality, a Starbucks], or a random coffee hut) on many street corners.

It’s a great way to demonstrate visually what actually goes into a coffee.  I think Edward Tufte would be impressed.  My favorite drink? A grande white chocolate mocha.  The downside?  According to Starbucks’ nutritional value page, it stocks a whopping 470 calories in just one 16 ounce serving.

As a side note, I’m continually amazed at the length of some people’s coffee orders up here.  I often wonder what the longest possible coffee order is, as measured by syllables.  I’d guess something on the order of a Doppio 2% Extra-Hot Espresso Macchiato.  Phew, that’s 15 syllables, but only 15 calories.

Getting things done: my way

I’m a procrastinator.  An expert at it, in fact.  However, at work, that usually doesn’t cut it.  I’ve been trying to figure out new ways to manage my to-do list, and I think I’ve come upon something that works really well for me.  I was reading a blog post over at 7Breaths about someone using OneNote and Outlook 2007 to manage their life, and it’s inspired me to write about mine, primarily using Outlook 2007.

Calendar View My workflow is pretty similar to Rob’s, especially with the categorization and coloring of items.  This helps me skim past personal emails and appointments while I’m at work. 

I make a point to block out two 30-minute blocks on my calendar for doing weekly reviews, recurring at 8:30am on Monday and Friday.  8:30am is usually early enough that I’m in the office, but not much is going on.  Monday mornings I’ll skim over my calendar and create tasks for major meetings that I need to do things in advance of.  Why have that blocked out on Friday morning as well, you say?  Well, what if I’ve got an important meeting that I need to prepare for on Monday morning?  I’d certainly prefer to find out about that before 8:30am on Monday.

I also make use of OneNote‘s flagging feature that Rob mentions, so I won’t go into that here.  One thing that I also do is, as e-mails come in, I’ll make use of Outlook’s flag feature to mark them as follow-ups.  After I’ve flagged them, I can get them out of my inbox and filed away in my filing structure (note: if you move a flagged email into a locally stored PST folder, it won’t show up in your to-do list.  Keep flagged items somewhere stored on the server!).

Flagged E-mail

(and no, neither Madden 08 or NCAA 08 are that good this year)

The to-do bar in Outlook is what really saves me.  By default, all your tasks will show up there grouped by time, as well as upcoming appointments (also color-coded based on the categories applied in the calendar).

One major change I’ve done is to change the filtering on the task pane.  It’s not very intuitive, so I’ll document what I’ve done here.  Basically, I got tired of seeing tasks that are (in some cases) a year out (no, I’m not that organized that I have things planned out a year in advance; it’s just that I setup a recurring task to renew some professional certifications).  If you right click on the "Arranged by" bar, and click on "Custom" as your filter, you’ll get a window that lets you customize your to-do task list.  Click "Filter" here, and jump straight to the Advanced tab.  Here’s the filters you’ll need to add to have it display like mine:

Field Condition Value
Date Completed does not exist  
Date Completed on or after today
Flag Completed Date does not exist  
Flag Completed Date on or after today
Due Date between today and 30d
Due Date on or before today
Due Date does not exist  
Status not equal to Completed

Some of these things are probably redundant, but it worked and I didn’t feel like digging through it to find out what I didn’t need!  The reason that Date Completed and Flag Completed Date have duplicate entries is because the Date Completed seems to affect only real tasks, where the Flag Completed Date items affect emails and other items you’ve flagged.  The heart of it is the Due Dates — this will only show me tasks that are due in the next 30 days or that are overdue (or don’t have Due Dates applied).  Finally, don’t show me things that I’ve marked complete.

This all keeps my to-do list manageable, not overwhelming, and fairly focused.  One other thing of interest: in that filter window, under More Choices, you can filter based on a Category.  Maybe you want to exclude things in your Personal category — that’s the place to do it.

Amazon Fresh: a test run

Amazon Fresh A few weeks back, we were out and about around town, and I noticed a truck and storefront for Amazon Fresh.  I knew the coming-out date had to be close for my neighborhood, so I headed over their webpage to request an account.

A few weeks later, I got an email saying that delivery was available for my neighborhood!  Last night, at around 10pm, I placed my first order.  I ordered a variety of things: Ziploc bags, bread, fruits, vegetables, dairy products, etc.  Part of the order was stuff we needed, and part of it was just to see how the quality of the food stacked up to shopping the grocery store.

I scheduled the order to be delivered today between 10am and 11am.  I had a slight problem with the website – the add/remove item controls in the shopping cart didn’t work, so I had to order with a few things I didn’t actually mean to order.  I called their customer service just before placing the order, and was happy to speak with a very plain-spoken member of their customer service team.  Definitely a native English speaker, and my guess would be from the Northwest or Midwest US.  She was able to quickly reproduce the problem I was experiencing, and sent it onto their web team.

amazonfresh 001 At 10am Saturday morning, the doorbell rang. Literally, at 10:00 and a few seconds. I swear the guy was waiting outside of the door watching his clock waiting for 10:00am.  Rather than drive the delivery truck up the driveway, he parked at the end of the driveway and used a hand truck to get the groceries to our door.  He brought the groceries into the kitchen, I signed a piece of paper, and away he went.

Diann & I quickly unpacked the groceries, taking a peek at the various fruits/vegetables that we ordered to make sure they lived up to the name of Amazon Fresh.  To my surprise, they did!  The tomato was ripe and red, the grapes were flawless, the strawberries were beautiful.

Amazon Fresh Tomato My only complaints about the service is that you can’t easily see ingredients of the products you’re shopping for, nutritional value, and my aforementioned problems with the website.  Diann’s allergic to corn, so we need to avoid high fructose corn syrup.  That’s tough to do when you can’t read ingredients, so we really had to try and stick with products we already knew. 

It’s cheesy, but I took a picture of some of the produce.  The tomato is there on the right.

 Great stuff, I’m pretty sure we’ll definitely be shopping there again.  I’ll be saving my grocery store receipts in the future to compare prices.

In-flight announcement translations

I seem to recall that some time ago the great George Carlin did a skit about airline announcements being weird. I offer up one of my own.

As heard last night on [Continental 1888]( from Houston to Seattle, after landing: “Please be careful when opening the overhead luggage compartments as contents may have shifted during flight.”

My translation: “Please be careful when opening the overhead luggage compartments, as contents probably shifted when the pilot slammed the plane down on the ground, used max autobrakes and full thrust reversers. This baby wasn’t gonna bounce.”

Another one of those days

Last week, I had [one of those days]( Today, I had another one.

After work, I headed to the gym. Went into the locker room, started changing, then realized I forgot to put gym shorts in my gym bag. D’oh.

Shortest gym trip ever.

Spam on Mailing Lists

Argh. I hate spam.

I run a few mailing lists on my system, mostly for college alumni and such, and I’m tired of having to deal with moderation requests to grow various parts of my anatomy.

I stumbled across [this site]( which talks about how to integrate mailman and spamassassin. Good stuff. Now I just have to see if it works over the next few days.

One of those days

Do you ever have one of those days where your alarm clock goes off, and you think, “I can sleep in a bit. I don’t have any early morning meetings or work deadlines.” Then you doze back off.

Then, 30 minutes later, your cell phones chimes up to remind you of a dentist appointment in 15 minutes?

Today was one of those days.