Welcome to LukeMcReynolds.com!
This is my place to put stuff online so I won't forget it, show the world that I can make a decent website, and share my thoughts with family and friends. It's also a place for me to share Linux/web development tips and tricks with the world at large, and a place for me to post pictures of my cat. If you don't know me and would like to, please get in touch with me - I'll try to respond right away.
A Quick Comment Spam Avoidance Technique for ExpressionEngine
I’ve been noticing some slightly strange search engine keywords used to find this website in my Google Analytics account. People are reaching my website by searching for things like “please enter the word you see in the image below”, “remember my personal information”, and “notify me of follow-up comments”.
These searches come from bots using Google to look for pages with comment forms on them in order to leave comment spam. Phrases like “notify me of follow-up comments” are likely to be on a comment page, particularly because that exact phrase is part of ExpressionEngine’s documentation for the Comment Entry tag.
So - and you should note that I haven’t (yet) done this myself - a simple way to cut down on random spam comments would be to change the wording on your comment pages. Make it be something just as easy to understand, but just don’t echo the generic EE-specific wording used in the documentation.
Posted on Jul 01, 2009 - 06:20 PM Categories: ExpressionEngine, Geekread more | 0 comments
Grand Rapids/Sacramento Differences, Part 1
Three interesting groups of people that I saw today that I probably wouldn’t have seen in Grand Rapids:
- Four Mexican roofers/painters walking in to a Starbucks at 8:30 in the morning and all ordering vente vanilla non-fat mochaccinos.
- Three attractive female construction workers, employed by the state, digging a big hole in downtown Sac.
- A group of three very gay office workers, all talking quietly in Spanish to each other in a suburban Del Taco.
I had always suspected this, but now I can confirm it: the Spanish Spanish accent really does sound gay.
Posted on Jun 25, 2009 - 07:14 PM Categories: Local, Personalread more | 0 comments
We’re in California!
So we’re in California now! Here are a couple photos I took on the way and while I was packing.
In more or less chronological order:
Here’s my old, old bike. Once I got a new one, I left the old one outside the back porch, leaning against the house. Nature soon hopped on top of it, perhaps wanting to go for a ride…
Here’s our cat in our empty living room. She looks a little sad.

I took this in Iowa. It’s the sign for the world’s largest truck stop, Iowa 80. It is indeed quite large. It has a barbershop, even.
Finally, here’s a shot I took out the back window of snow on the Sierra Nevadas, on I-80 before Truckee. It’s good to see the Sierras again.
Posted on Jun 18, 2009 - 12:45 PM Categories: Family, Personal, Photoblogread more | 1 comments
The Guy Who Runs Look Who’s Been Busted Is Kindof a Dick
Since I wrote about the new newspaper in town, Look Who’s Been Busted, I’ve gotten a lot of comments and e-mails from people who think that I publish the newspaper, both positive and negative. (For the record, I don’t publish Busted - a guy in Ocala, Florida named Dan Oakley does.) While I think the idea behind the newspaper is kinda scummy - people who get arrested usually have enough problems without being profiled in a local newspaper - I think it’s entirely legal. That’s what the 1st Amendment is for - it’s protecting this guy’s right to say what he wants, which is as it should be.
That said, this guy’s still a dick. Bear with me here…
I got an e-mail the other day from a woman in Oregon who was arrested for possession. It was a wake-up call for her: she started going to rehab, and started getting her life back together. Then, a distant relative of hers calls her up to tell her that her mugshot is on the cover of one of the Clackamas County, Oregon Busted newspaper. Her children found out, her family knew about it, it was a big mess.
So, this woman e-mails me, complaining about it. I tell her I don’t publish Busted, etc, and give her the newspaper’s e-mail address. She e-mails Busted; the text of her e-mail is below:
Posted on Jun 05, 2009 - 12:28 PM Categories: Local, Personal, Politicalread more | 0 comments
Valid W3C XHTML Embed Code for Hulu
After embedding the previous Conan O’Brien clip from Hulu, I noticed that the Hulu embed code broke my site’s W3C XHTML validation. This is because the embed tags that Hulu uses aren’t part of the XHTML 1.0 standard.
Anyway, I figured it out. Here’s the valid embed code for the Conan clip:
<object type="application/x-shockwave-flash" style="width:512px; height:350px;" data="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA"><param name="movie" value="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA"></param><param name="allowFullScreen" value="true"></param></object>
and here’s the default, non-valid Hulu embed code:
<object width="512" height="296"><param name="movie" value="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.hulu.com/embed/WR0hLnMSUwAcnpJ8XWHuNA" type="application/x-shockwave-flash" allowFullScreen="true" width="512" height="296"></embed></object>
Adapted from Bernie Zimmerman‘s article.
Posted on Jun 05, 2009 - 10:36 AM Categories: Geekread more | 0 comments
This is how I feel about Twitter
Conan O’Brien sums up how I feel about Twitter pretty well. Here he is:
read more | 0 comments
Weblog Entry Date Offset in ExpressionEngine
I recently had a client ask me to have their “Blog Archive” page display all of their previous weblog entries - except for entries posted in the last week.
That seems like a pretty reasonable request, right? Weblog entry display dates should be able to be sliced and diced however the user should want, with a minimum of work. Unfortunately, looking through EllisLab’s extensive weblog entry tag parameters documentation, I couldn’t find anything like a date offset function. The closest exp:weblog:entries paramaters I could find were the start_on and stop_before parameters. The problem is, the stop_before parameter would have to be dynamic: it would have to be consistently set to seven days before the current date.
I was able to solve that problem with a little PHP - read on for the code.
Posted on Jun 02, 2009 - 01:51 PM Categories: ExpressionEngine
read more | 0 comments
We’re Moving to Sacramento!

Lauren and I are moving to Sacramento! Lauren was offered a job 20 minutes after her phone interview, she accepted, and we’re moving!
We’re both glad to move back to California, even though we’ve grown to like Michigan a lot. The people in Grand Rapids are great, Michigan’s outdoors is stunning - even though it’s no Lake Tahoe or San Francisco Bay - and overall, it’s a really, really friendly place. I like Michigan.
But bigger and better things are calling to us. Lauren is flying out a day or two early with our cat, Lion. We’re having our stuff shipped there, and I’m driving our car to California with my Grandpa.
Lauren’s new job is in advertising and marketing, like she does now, and I’ll keep on doing my freelance web/ExpressionEngine development thing. We’re both excited. Pray for us for the trip and for the transition - it’s our first major move, ever.
read more | 0 comments
split - Invaluable Tool for Dealing with .csv Files
I just learned about split. It’s a linux command line utility that splits a text file in to however separate files, each however many lines you specify.
Here’s a usage example. I have a mailing list of about 20,000 names and addresses. It’s stored as a .csv file, so it’s basically just a big text file. Each name/address is on a separate line. Because the responses will be overwhelming if we send something out to all 20,000 people at once, we want to stretch the mailings out over a period of time - say 600 names/addresses per day.
Unfortunately, your mailing house needs separate files for each of the mailings - they somehow can’t split the file into parts of 600 names each. So, instead of spending half an hour copying and pasting rows in Excel or OpenOffice, just use split.
The basic syntax is
split -l 600 yourfile.csv
, where 600 is the number of lines you want per file, and yourfile.csv is, of course, the file you want to have split. With a list of almost 21,000 names, the result for me was the original file, plus 35 text files with 600 names in them. The files that split creates are, by default, named xaa, xab, xac, etc. For me, my files went all the way through xbi.
split is part of GNU coreutils, so nearly all linux distributions should have a copy of it. I hope this helps someone - I know it saved me a lot of work.
read more | 0 comments
Dog in Kensington Market, Toronto
I saw this dog while in Kensington Market in Toronto last week.
Posted on Apr 15, 2009 - 08:56 AM Categories: Photoblogread more | 1 comments
