poker no more

Cocksure.
Good morning people! I’m happy right now because I’m writing the intro paragraph, which means this entry is almost done, and it’s only 9:30pm. Sharaun and I are doing the regular: she sits on the loveseat grading papers while I sit on the couch mucking with the laptop, all the while TiVo’d episodes of CSI play in the background. Come 10pm, she’ll head off to bed and I’ll move into the computer room where I can listen to tunes. Before that though, you can read this entry!

After a nice ride home, I turned on our electric fireplace and settled down with some cold pizza for some quality time with W. I was thinking how sucky it must be to be Cheney or Hastert and know your face will be in the shot of Bush during his entire speech. You can’t yawn or whisper or pass notes to your neighbor, you’d better applaud at the right time and look thoughtful or proud at the right time, and should laugh summarily at every joke. I also wonder how the network decided who’s face they’ll spotlight in on during certain parts of the speech. Is McCain asleep? Hillary digging at her nose? Get me tight on her face!

People who don’t care about behind-the-scenes blog technicalities can skip ahead.

For those who are interested in how I modified my StatTraq plugin to not log referrer spam, here ya go. I just added one more condition to the IF statement that enters a row into the stattraq database. This condition checks two things. First, does the referrer link contain a known spam keyword or spammer IP? Second, is the referrer link a query from a search engine? If the referrer link contains a known spam keyword or spammer IP, we don’t enter it in the database. The only exception being the case when someone is being referred to the site from a search engine where their search string contained a spam keyword. It amounts to something like this:

IF [(referrer does not contain known spam keyword AND referrer does not contain known spammer IP) OR referrer is from a search engine] THEN log referrer

I accomplish the OR referrer is from a search engine by searching for a question mark in the referrer string, since most search engine referrals have a “?” before the query string the user typed to get to your site. Today was the first day I ran StatTraq with the new conditionals, and I logged zero referrer spam links. Oh sure, since I don’t block spamferrers with .htaccess, they’re still in the main Apache logs, but I don’t care about that – I really only check stats for the blog. For those who’d like to do the same to their StatTraq, just replace the following line in stattraq.php (word-wrapped here, but will be a single line in the PHP file):

    if (!strstr($_SERVER['PHP_SELF'], 'wp-admin') && 
    !strstr($_SERVER['PHP_SELF'], 'wp-stattraq'))

With these (the IF statement is word-wrapped here, but make sure it’s just one long line in the PHP file):

    //grab modkeys from WP db
    $db_pattern = get_settings('moderation_keys'); 
    //create array on carriage return
    $db_pattern = explode("\n", $db_pattern); 
    //trim whitespace off all array elements
    $db_pattern = array_map('trim', $db_pattern); 
    //create long string with '|' separating elements
    $db_pattern = implode("|", $db_pattern); 

    if (!strstr($_SERVER['PHP_SELF'], 'wp-admin') && 
    !strstr($_SERVER['PHP_SELF'], 'wp-stattraq') && 
    ((!eregi($db_pattern, $referrer) && 
    !eregi($db_pattern, $ipAddress)) || ereg('\?', $referrer)))

The list of known spam referrers and spammer IPs is read right out of WP’s “moderation keys” option value for discussions. This is the list stored in the WP database which all comments are checked against before either going into the moderation queue or heading straight to the database. The great thing about using the WP moderation keys for the spam-compare string is that the keys are updated each time a new spammer is blocked using Kitten’s comment spam plugin. So, every time you kill a spam comment, its attributes are automagically added to the compare-string for stattraq entries. Exploiting the combination of WordPress and Kitten’s plugin serves to create the perfect spam-compare string; keeping 99% of comment-spam out of the WP database, and 99% of referrer-spam out of the stattraq database.

And, if you’re here reading about how to stop referrer spam from being logged in your stattraq table – that probably means you’ve already got some in there. So, after you’ve implemented the above code and blocked any new spam logging, you may want to go back and clean out any existing spam entries from your stattraq table. Luckily, the spam keywords list from above can be easily adapted into an SQL DELETE FROM statement which you can run on your stattraq table from within phpMyAdmin. For your reference, here’s the SQL statement:

click me for file

That should help cleanup the stattraq table a bit. I actually wish stattraq had some kind of “archive” or “clean” function built in, since that table can get really big really fast with all the search engine bot visits. Anyway, hopefully someone will find all this useful. (As an aside, do you know how friggin’ long it took me to figure out how to make that text file icon have no border and no link-underlining? Stylesheets are awesome, but can be a pain to override.)

And, before I get off the dev-talk, I’m pretty pumped about the upcoming new version of WordPress. Sounds like the UI is gonna be all new and cool looking, and the new “rel=nofollow” attribute thing will be rad too. Moving to WP as my blog software was the awesomest thing I coulda done.

Hey, non-technical-carin’ readers… we’re back to normal now.

Remember how I was gloating about getting my taxes done and filed so early? And, then, remember how I was saying it didn’t matter that I finished them so early, because I was confident I had all the data? Well, I got yet another 1098 in the mail today… some mortgage interest from a lender on my 2nd that I’d completely forgotten about since the refi. So… now I’m furiously amending my fed and state returns, to my windfall, granted, but still a pain. I guess, not only does the early bird get the worm – he also sometimes gets bitten for jumping the gun. And I was so satisfied that I was done with the whole mess. An amended tax return? What a blemish on my taxin’ skills. To ice the cake, now I’m afraid to file an amendment lest I get more stuff I don’t expect. Ugh.

I’m going to bed now, ‘night y’allz.

grow old with me

Hear here.
It’s late, and, like always, I write this paragraph last, so all the stuff below sounds like it mysteriously predates whatever I say here. I usually try and make this intro paragraph as time-neutral as possible, since it can get confusing reading sequential paragraphs that are really chronological. But, tonight I wanted to talk about how late is is right now – and how I don’t know why I’m even up right now… I guess I got too wrapped up in fiddling with the databases (read on). So, the “last nights” and whatnot are all confusing… it’s all the same day really. Enjoy.

Last night, I did some quick modifications to my StatTraq plugin which stops it from adding known referrer spam links to the database. I realize a solution using .htaccess is more robust – blocking referrer spam from my entire domain – but I could never get .htaccess to work right. So, I made some rough hacks to my stattraq.php file that tell the plugin to ignore spam referrers based on keywords; they never make it into the database. I didn’t make it pretty, meaning you have to go in and add new keywords to the actual stattraq.php file when you want to update the block list. I borrowed the base keyword list from a post at Caveat Lector, and it seems to work pretty well using wannabrowser to test. I also created an SQL statement that can be run from phpMyAdmin and will do row deletes based on the same referrer spam keywords, cleaning up the stattraq table a bit and making my statistics relevant again. Referrer spam is the ultimate annoyance to me, so I’m ecstatic that I’ve made some progress at blocking it.

From the music department: With memories of liking their stuff on an old Bright Eyes split, and Ben’s recent recommendation, I picked up the new Ambulance Ltd. LP. It’s really good. There’s one song on there that I absolutely love, track 3, “Anecdote.” With a Beatlesesque whimsy and uber-catchy hook – I must have listened to it on repeat for an hour at work yesterday. Great plodding beat that makes me think of a trotting horse… good for working as it somehow implies steady forward progress. You can check out the song here, as well as every other song on the album for that matter.

I can remember buying blank tapes in bricks of ten and twenty from Wal Mart. Not the razor-thin 120min “Wal-Dub” brand, but 90min Maxells or TDKs. It would have been middle school… 7th, 8th, 9th grade even. I’d always been a fan of music, but meeting Kyle expanded my listening canon exponentially. He was into all kinds of music, and his dad would mail him huge boxes of tapes every couple of months. He got me hooked in no time, I was constantly borrowing his tapes so I could make copies of my own. His dad had a varied taste, so we got exposed to a lot of good music. I remember being so proud when I had over 100 tapes, then 200, and eventually tapes got pretty uncool right around ~300. I hand-labeled them, sometimes laboriously, drawing pictures or getting artistic. Sometimes Kyle’d have to tell me to “relax” because he hadn’t even had the chance to listen to stuff before I wanted to take it all and mass-dub it. That’s when this monster was born in me. My hording problem continues to this day, although now one 90min tape takes up roughly 200MB on a disk instead of half and inch on a shelf.

One time I had a thought, that you can map the phases of a growing kid’s life to the Beatles’ musical evolution. Well, OK, at least, it kinda worked for me when I thought of it.

You’ve got the “first four”… which I’d equate with the “innocent” times growing up… before you’re troubled by much… when things are simple and easy. There’s a formula for everything here, and you don’t stray from it much at all – it works and it’s comfortable, and you know nothing else. It’s a carefree time, remembered fondly.

Round about 10 or 11, you’re suddenly a little more world-aware. Not everything comes on a plate, you’re starting to have non-standard thoughts. This is your “Help!” phase. You’re maturing, slowly but surely… there’s something different under the surface here, something very non “first four.”

Enter age 12… the last pre-teen year. You’re hearing and seeing things you’ve never imagined, absorbing information faster than ever. You’re impressionable, you’re thinking more about relationships and have become more introspective. Welcome to your “Rubber Soul,” where you’ve taken a complete right-turn and have now established that there really is something very different going on with you.

Years 13-14, your “Revolver.” You are now worldly, you’ve got some street-smarts, you’re experimenting with some very unconventional ideas. It’s obvious now to anyone with ears that you have changed. You are far beyond the innocence of the first four, you’ve distanced yourself from the am-I-or-aren’t-I phase. Here and there are subtle hints of what’s to come… a revolution under the surface.

15-17; holy crap you dropped the hammer, the throttle is wide open. You’re at the apex of your coming of age and you’re squeezing every last drop of excitement and newness out of the world. In this, your “Sgt. Pepper” phase, you’re brain is wide open to anything… and it’s obvious to all. Filled with wonder, over-indulgence, and reckless invincibility. Nothing will ever be like this for you again. You are unstoppable, you are high on life, every second of every day is bursting with some kind of feeling, good or bad.

You’re 18-19, “legal.” The insanity of your Pepper years has waned as the independent forces in you become more evident. You’re less about me-me-me. Welcome to your “White Album.” The forces that have been swirling in turmoil within you for the last few years are beginning to gel. Some might see this as “going soft,” but it’s actually the first real time you’ve been able to take stock of the emotional person you’re becoming. You’re taking the threads which you’ve been busy growing and finally weaving them into something. As such you may seem more many-sided than ever, but it’s the breaking down before integration.

19-24 years old. The “Let It Be” times are uncertain, tumultuous. There may be infighting withing you, as you realize you’ve been doing this for quite a while. It’s almost time to grow up and part ways with the activities of youth. You’re paying bills, on your own, dealing with people like you’ve never had to before. At times you party like you have no responsibilities… at times you’re serious. Your friends have the same cycles but not necessarily at the same times. The youth of your “first four” seems far off, and you’re sad for it at times. Things are just too complicated… you find yourself wishing for a return to the “first four” days, and may even indulge in silly nostalgic “reliving” activities.

25-30. Welcome to adulthood. You’ve made the transition and your “Abbey Road” swansong is a perfect mixture of newfound confidence in maturity and owing nod to the things that came before. The end of youth isn’t ugly, or bitter; you’re doing some of the best work of your life. You bid a fond farewell to youth, but it’s obvious you still know how to enjoy youthful fun. You’re not reliving youth out of yearning anymore, the learnings of your youth are a part of you and evident in what you’re creating. Enjoy it, because after this it’s only Wings and Yoko.

Well, I guess that’s it. I spent entirely too much time on that Beatles thing. Check it. Goodnight.

I can feel Spring coming

Spring flowers.
As you can see, I once again missed the midnight deadline for automatic posting. No biggie, I can always post 1st-thing in the morning on the day-of. Listening the Bright Eyes in my 15min before work officially starts, and I’ve got a meeting straight-away at 8am this morning. I have a feeling this will be a short one, since there’s just not much to talk about. Well, OK, I could fill reams… but not yet. So for now…

Ever since I’ve been riding to work, my legs have had a dull soreness during the day that I’ve really come to like. It sounds strange, but I like the feeling… it’s a kind of reminder that my legs have actually been “working” a bit. Riding to work has been more enjoyable that I thought, it offers some slight feeling of being unfettered; from my vehicle, from the roads, and from my normal sedentary commute. Even if the original end-goal was ~1hr of aerobic exercise a day, the means have turned out to be something I really dig – rather than something I dread.

As a born doubter, I guess I’m sometimes too pessimistic. By all accounts, the Iraqi people turned out in huge numbers for this past weekend’s vote. I’m not wildly liberal enough to blame some right-wind media fleecing, so it seems my negativism was unfounded. With that knowledge, it really becomes a moot point as to whether or not these people actually researched their votes, or just went along party/religious lines. The more important thing is that they came out and did it. Know what percentage of America turned out in 2004? 60%, the highest since 1968. The “liberated” people of Iraq tied us. I’ll be interested in the results, and who’s given power, and the distribution of votes. That’s right world, I’m interested… fear my piquedness.

I can feel spring coming… and summer in the distance. The days have been sunny and clear lately, taunting the cool temps with get-outside-and-do-something vibes. Stupid sunny days that beg for me to take sick days and do yardwork or sneak a pipe-smoke in the house with enough time to air it out before Sharaun gets home. I’m mentally planning camping and hiking trips, extended concert outings, all sorts of stuff. Pretty soon though, the devil-heat will settle over Northern California, and my rides to work will get a lot sweatier. I’m totally rambling.

Maybe it’s old, but you gotta check out this site. When you put up an obvious joke-site like this and start getting vitriolic letters from the offended, you know you’ve achieved the perfect level of sarcastic subtlety to fool the ignorant masses. Classic.

I really am sorry. Really.

chalk or dirt trails?

Disturbing.
This weekend was a pair of gorgeous days… the brightest, sunniest, clearest days we’ve had lately. I don’t know what it is about gorgeous sunny days… they just make me want to do things, to get outside… and enjoy them. I think I did pretty well this weekend, taking time to enjoy two of the best rainless days we’ve had in a long while. As such, this entry goes down more or less as a play-by-play of the weekend’s events.

It started Friday night with the post-work round of beers and appetizers at the steakhouse/bar. That complacent mood just settled over me like a fog, making me feel just right just then. I didn’t care where we went afterward, or how long we stayed… it was one of the times you’re just with friends and drafting off the joy of company, small talk, and a the swirly happiness that an alcohol-infused bloodstream can provide. Luckily, I managed to maintain the feeling overnight… and early Saturday morning found us over at Kristi and Erik’s for a fine homemade breakfast of waffles and eggs. I ate and relaxed with that right-where-I-wanna-be feeling. Sitting on the couch watching a poorly-produced VHS video of Mexican bullriding… these people are dying… I’m mean, ceasing to live… it’s insane. It was a good morning.

In the afternoon Erik and I decided to go out for a ride, both being owners of new bikes. This city is completely crisscrossed with well-maintained, paved bike trails. They cut through neighborhoods, skirt duck-ponds and city parks, and where there aren’t defined trails – there are always marked bike lanes to the sides of every road. We had no destination, just wanted to get out in the sun and make a sweat offering to the weather gods. We ended up finding some empty lots with plenty of hills and ditches and rocks, and for a good 20min I was twelve again. Huffing my way to the tops of dirt hills, zooming back down to search for anything I could launch off of with my new gravity-given speed, fishtailing and riding wheelies… it was great. Once we got back to the trails, we “discovered” some parts of the city we’d never seen before, and, more importantly, some more trails we didn’t know about.

Riding on the trails made me think of something Pat had said earlier in the week, something about thinking there might be a trail-only shortcut that could ease my rides to work and back. Sure enough, the exploration Erik and I did led to the discovery of a completely new route than the surface-road route I’d been using last week. The alternate route is comprised of probably 20% road and 80% trail. Paved trails, mind you, but trails that wind their way to work in a much more direct route – and without any car exhaust or traffic lights or stop signs to compete with. I actually can’t wait to try it tomorrow, and see if it really does buy me time or not. Since I can’t drive the new route, I’ll need to borrow a GPS to compare the mileages… but even it does turn out to be longer (which I don’t think it will), I plan to take it anyway. It’s so much better, I’m so happy we “found” it.

Sunday, I woke up early and cleaned the bathroom and shower, finally replaced the burned-out bulbs in our closet, and made my first real yard-demanded trip to Home Depot. Picked up some crabgrass killin’ fertilizer and pranced around my yard pushing the SpeedyGreen 3000 in front of me like a proud father and his chemical-spreading baby carriage. To make sure the fertilizer gets in there good, I run the sprinklers for a few seconds in each zone. I don’t know why I’m going into this much detail… all I wanted to say was that, as I was standing in the driveway, watching the sprinklers in the sun and waving to neighbors – I was happy… I was content. I mean, it’s hard not to be… brisk mid-50s, cloudless sunny skies, and the feeling that I was witnessing what was the beginnings of a new summer.

I noticed today that several blogs are talking about Halliburton leaving Iran. I’m not usually one for conspiracy theories, but with recent “posturing,” it does seem that there could be a tad more to it than a simple contract expiration. They’re already charter members of the AoE, and the media coverage lately has had a snowballish be-afraid tint to it. With the headlines from the Iraq voting over the weekend being so rosy, it would seem that all my doubt and cynicism was for naught. I would, however, be interested in hearing the ballot tally… as in how many people voted. Not absentee, citizens in-country. Not that a low number would really prove much, I just think it’d be interesting as a percentage of the population. (Wow, ask and ye shall receive… 60% is awesome.)

Does anyone even notice that I alternate my little post image from left to right with each entry? That’s a manual process you know!

Goodnight.

anywhere but here

Sleep is comfy.
Late post. I had big plans last night for a nice meaty entry today – then lost all steam once the television came on. That thing is a brain-drain man, taking ideas right out of you. I have much better luck writing while sitting in front of the window and listening to tunes. Anyway, didn’t post earlier this morning because I was giving a training to some of my Taiwanese buddies… went well, I find I feel much more confident up in front of people I’m familiar with. So, it’s gonna be thin again.. but I actually dig this one more than most of the entries I’ve been responsible for lately. Read on.

You ever get that feeling? The one where, no matter where you are, you think that at that second you’d rather be nowhere else than warm in bed with the person you love? I get that feeling sometimes… I got that feeling today at work. Sitting in a conference room, thinking about nothing. All of the sudden I wished it was 6:30am on anyday and I was wrapped in blankets and smelling my wife’s hair while the alarm snoozed. Usually right after those moments, I wonder where she is… what she’s doing, is she alright? Since I couldn’t call, I text’d her: “Hey, thinking about u. In a stupid meeting. Miss and love u.” There, that should do it… that should help. Ahhh… 1 New Message: “Love u too. Call after your meeting.” There; all better for the time being. It’s not warm blankets and soft skin and sleep-breathing, but it’s the best I’m gonna get until 6:30am tomorrow – so I’ll take it.

I dunno what was up with my writing this week. I can blame it on the usual suspects: being too busy at work, laziness, whatever. But in some ways, a slow week on some internet page where I write means a very not-slow week in the real life I live… where I don’t have to or don’t choose to write about things because I have something better to do. Besides, I honestly think I drained myself writing last Friday’s entry. I invested so much time in it, so much thought. It really wore me out, which I find kinda awesome. I mean, that you can write something so “hard” that you’re actually strained afterward. If only I could write that hard all the time. Y’know, that might be a good blogger motto: “blog hard.” Actually, that would be awesome in all-lowercase black arial font on a white t-shirt. I could make some money maybe. Except… isn’t there some shoe company or sports-liquid drink whose motto is “play hard?” Bummer.

Today was productive, with a visit to the dentist and a much-needed haircut. It turned out to be sunny, where I’d heard earlier in the week it was supposed to rain. Since I had rain in mind, I didn’t set the alarm early enough to bike in… which I was kinda bummed about once I saw the blueish sky through the shower window. If you’ve been reading this rag for a while, you know I get off on “accomplishing” a lot in a constrained time. I love days where I manage to bounce from one thing to the next, getting all kinds of productive junk done in what feels like record time. So when I can have a good day at work, make a teeth-cleaning, grab a haircut, and still have time to grab a beer with a buddy from work… it’s a good day in my eyes.

Oh, and I was far and away more amused than anything. Until Monday, have a good weekend.

when moths attack

Chugga-chugga woo-woo.
The other day, Ben mentioned that he’d downloaded the new version of Winamp, and that it had several “Internet TV” stations available… streaming all sorts of video content. He also told me that there appeared to be a plethora of porn stations being freely streamed. The video thing in general sounded cool, so I decided to check it out. Sure enough, there was a lot of porn. Now, I’m no porn-addict, but curious to see what freely streamed porn looked like, I browsed through a couple “channels.” Only then did I realize that I was using Winamp to “investigate” this porn, and remember that I’d installed a plugin for this page that displays what I’m listening to in Winamp. I wondered… open IE, browse to the blog, oh crap. Right there in the “currently hearing” section of the sidebar is an impressive list of porn-sounding names, the stream names even identify them as videos – so there was no mistaking that I was indeed checking out porn rather than simply listening to songs with porn-sounding names. Ugh. Thanks a lot Ben.

I guess the idiot award today goes to this guy here in CA who, in an attempt to take his own life, stopped his truck on the commuter train tracks. Then, in a last-minute moment of revelation, decided he wanted to live – and up and left his truck on the track. Train smacks truck, crashes up hard, and nearly a dozen people die. Now the I-wanna-die-wait-no-I-don’t dude faces the death penalty, which is hilarious to me… since it’s what the fool wanted in the first place. Next time, consider a less killin’-ohter-people way of taking your life, especially if you think you might reconsider at the last second. On the reals though, poor dude must be pretty mentally messed up by now… as if he wasn’t already.

Most of the people I work with in Taiwan are here this week for some on-site training. Yesterday I walked over to the conference room they were all in to say “Hi.” As soon as I crossed the threshold, I was brutally assaulted by the smell of naphthalene. Y’know, mothballs? What is it with Chinese people and mothballs? I love my Asian brothers, and have had some great times hanging out and working with them – but, much to the disappointment of my nose, they love them some mothballs. I’m sure, to them, Americans all reek of Double Quarter Pounder with Cheese or SUV or something. From the olfactory potency, they must’ve packed ’em in their suitcases or something.

Then I guess that’s it… I have nothing more. A week of tiny entries I guess. Nite.

disrobe for peace

Bazooka time.
There’s something so awesome about stripping off the days clothes and trading them in for something looser and shoeless. Sometimes it’s the only thing I wanna do when I get home… pull off the shoes and socks, yank the outer shirt over the head, and swap the boxer-twisting jeans for some non-binding shorts. Perfect not-goin’-out wear for… not going out.

CNN ran an awesome story as their lead item late today (yeah, I’m back to trying to write at night). It was on the upcoming Iraqi election, and my favorite quote was, “Although most say they don’t know who the candidates are or where to go to vote, they say they will vote come January 30…” Yeah? They don’t know where to vote, but they will vote? Assuming they can wander the vast deserts of Iraq long enough to find the hidden, unpublicized, polling places… they don’t even know who they’re voting for… why vote? I know why… because they believe in the salvation that is democracy, that’s why.

One of the stats I like to keep track of how “saturated” the search engines are with regards to my blog; meaning, out of the total number of pages that make up my blog, how many have been spidered and indexed by search engines. Last night, Google must have done a huge update… and my saturation jumped from a previously semi-stagnant ~25% to a respectable 65%. It’s amazing what that jump translates to in terms of referrer stats. Google is now sending three people my way for every one it did before. It could be good for readership, but it’s also an even more fragrant flower to the spam bees. Stupid spam bees.

I sat here for 15min trying to come up with more to write, but I guess sometimes just going with what you have is the best strategy. With that in mind, I’ma press “Publish” and post these couple measly paragraphs. Goodnight.