The READIN Family Album
(April 19, 2002)

READIN

Jeremy's journal

Although I have done it all these thirty years or more, although I live my life surrounded by other people who are always doing it, still I think that there are few activities so worthy of inspection as the reading of novels.

Juan Gabriel Várgas


(This is a page from my archives)
Front page
Most recent posts about Programming Projects
More posts about Projects

Archives index
Subscribe to RSS

This page renders best in Firefox (or Safari, or Chrome)

Tuesday, November 20th, 2007

🦋 Filtering out page reads

You get a lot of stuff in your web server log file that does not have to do with actual human reads of your site. I wrote a script that I think shows all the human page views in an Apache log file. It relies on that browsers get css stylesheets, while robots generally don't. (It will miss humans using Lynx; it could easily be tweaked to fix that enough. Also, I have seen Yahoo getting css files; you can fix that by putting "Slurp" in the list of files you're not interested in.)

grep  "blog.css" $logfile  | // get all reads 
                                of blog.css
        awk '{print $1;}' |  // extract ip address
        sort | uniq |        // only show each ip once
        grep -f - $logfile | // now pass that list 
                                of ip's back to grep
        grep " 200 " |       // only show successful reads
        egrep -v (any files you're not interested in)

I believe you could also use "favicon.ico" instead of your css file, but this is less reliable -- I don't know how often browsers request favicon for sites they have already visited. Or you could use the filename of a graphic included on one of your pages and hosted on your site, I think this would work reasonably well.

posted evening of November 20th, 2007: Respond
➳ More posts about The site

Wednesday, November 14th, 2007

🦋 Blogging activity

So I'm coming up on 900 posts on this blog, in the past 4½ years. (And some number of "posts" in the previous 3½, when the site was something proto-blog-like, but there is not any easy way of counting them.) Here is how the activity breaks down year by year:

        +--------------+----------+
        | year(posted) | count(*) |
        +--------------+----------+
        |         2003 |      184 |
        |         2004 |      175 |
        |         2005 |      160 |
        |         2006 |      135 |
        |         2007 |      232 |
        +--------------+----------+

(Remembering that 2003 was not a full year for the purposes of this discussion) -- it seems like this last year is about the most active since I started blogging -- this becomes particularly noticeable when you consider that I posted very little in the first few months of this year. -- Indeed October '07 has half again as much activity as the next-most-active month, which is August '07; four of the ten most-active months are in 2007. This has been the latest installment of obsessing over meaningless statistics; tune in next month for popular Google search referrals.

posted evening of November 14th, 2007: Respond
➳ More posts about Projects

Saturday, November 10th, 2007

🦋 Comment Spam II

OK: The comment spam filter I have in place right now is working (so far); but it would be pretty easy to circumvent if a spammer was determined enough. But I have in mind a pretty simple way to expand it and make it secure, and way better than the captcha images that everybody hates. (Drawback is, it relies on Javascript, which not every browser supports. This could be gotten around a couple of different ways.) I am going to try and implement it over the next few weeks and then I will write it up and try to get other people using it -- it's way better than captchas. (I won't write it up until it's in place because the writeup would include information on how to get around the current, insecure filter I have in place.)

Update: Oh wait, no it actually wouldn't be much more secure than the current scheme. A little harder to get around I guess.

posted afternoon of November 10th, 2007: Respond
➳ More posts about Programming

🦋 Comment Spam

Last night I got hit with my first really major spam attack. So, this morning I implemented a solution I've had in mind for a while. I'm not totally sure it will work but we'll see. If it does work, it's pretty elegant and would require substantial amount of legwork on the part of the spammer to circumvent it, work that I'm pretty sure my site is not worth. Again: not disclosing it in public but if you're interested, let me know and I'll tell you how to do it.

Note: I just deleted a ton of comments without checking. If you left one last night, I deleted it and I apologize.

Update: Well the spam is coming fast and furious all morning and getting intercepted by my trap! Groovy, we'll see how it holds up.

Update: It gets even better! Now Lynx users can leave comments without getting tagged as spam. If you are trying to leave a comment and getting rejected as spam, let me know.

posted morning of November 10th, 2007: Respond

Friday, November 9th, 2007

🦋 Reboot! Restore!

Boy oh boy, tonight I rebooted the new server for the first time since I got it running back in late September! Why, you might ask -- it was not sick, nothing was wrong with it. Well: I inherited an oldish flatscreen monitor from my workplace -- a reboot was necessitated in order to get the computer talking to the screen. That's kind of big news; the old monitor was the one I've been running with ever since I inherited the previous computer from my previous workplace back in 1996 or thereabouts. It was a totally inappropriate monitor for the purpose it was serving; a monstrous, 22" CRT that must weigh over 30 lbs., that totally dominated the desk even though it was never turned on. The new screen will be a much better neighbor for the other things on the desk.

I was a little concerned when I rebooted and the web site was not accessible; I had sort of assumed that apache set itself up, when I installed it, to run as a daemon without anyone having to log in. Turns out that's not the case! Anybody want to tell me how to make it so? sshd starts automatically, which is good. Took me a little while to figure out how to start mysqld -- this would also be a great process to have loaded automatically when the system boots.

And: After I posted this, I noticed its id was 877 and I thought that's weird, wasn't I posting stuff in the 880's earlier? And I looked at my database backup from this morning (!) and saw that there were indeed more posts than I was seeing on the site. Kneel before me, Mysql! I know how to backup and restore databases! (And thanks, Mysql, for making it so easy to do, that a lazybones like myself can do it.)

So... If you're commenting on this post and want to tell me how to get mysql and apache auto loading, it would be great if you could drop a hint about how to make mysql exit gracefully as well, because it sure seems like it did not do that this evening.


Update: Developing... it looks like to make apache and mysql load on boot, I need to put them in /etc/rc.d/rc.local. Now, my computer has no such directory; but it does have rc?.d where ? is a number from 0 to 6 or the letter S. There is also etc/init.d. I should be able to figure this out...

posted evening of November 9th, 2007: Respond

🦋 Archives

Looking for that READIN post you read and enjoyed last year, but can't find it? I've added an Archives page that should be of some use. Posts are sorted by topic and by date. Let me know if you like it or if you think of any features that would make it more useful.

posted morning of November 9th, 2007: Respond

Tuesday, November 6th, 2007

🦋 Woo-hoo!

I hit on a way to defeat comment spam coming in from chin/e/sefr/eewebs, which I'm getting a lot of lately. Not saying what in public, in case they come around and notice; but if you are getting hit with similar traffic, drop me a line and I'll give you the recipe. It's pretty simple.

posted afternoon of November 6th, 2007: Respond

Thursday, October 18th, 2007

🦋 First comment spam

Wow, that was fast! Guess I will hafta come up with some kind of security thingy.

Update: Well I wrote a script for quick deletion of spam. What should I do about blocking it? A captcha?

posted morning of October 18th, 2007: Respond

Tuesday, October 16th, 2007

🦋 Comments are open

Ok: All the time I've had a blog I've wanted to host comments. And now I do, at least in a rudimentary fashion. You need to put <br> and/or <p> tags in your text if you want paragraph separations. html is allowed for now; indeed security is almost entirely lacking. It would probably be possible to break my software; please don't try. Or at least, send me a note if you have an idea for something that could break it.

Update: I fixed it so you do not have to markup your paragraph separations. Yay me!

Update as of Wednesday morning: Here are some more things you can newly do: Include apostrophes in your name/handle, and not have them show up backslash'd; include apostrophes in the body of your response, and not have the whole thing chucked out; include links in your response and not have them stripped out. I am using tidy to clean up the html in the comments and it is a temperamental thing. Powerful tho'.

posted evening of October 16th, 2007: 10 responses

Monday, October 15th, 2007

🦋 Font query

I'm interested in sweetening up the look of this blog by changing the fonts used, and wonder if anybody reading has advice about what fonts to use. Here is what I'd like to do:

  • The three sections of the blog -- left sidebar, body, and right sidebar -- should be distinguished from each other. My thinking was that the left sidebar should be a slightly smaller font size, and maybe the right also, and possibly a different named font. But I don't have a designer's eye of what named font looks good where.
  • The headers should be a different font from the text, I was thinking they should be sans-serif.

That's pretty much it; I will check what wordpress stylesheets look like, since I tend to really like their presentation. I need to learn how to use css, which seems pretty easy but which I have been resisting up until now. Anyone got advice for me?


Update: Hmm... well that's something anyway. Plagiarized some styles from wordpress, added a couple of my own. Still not totally sure how this thing works.

posted evening of October 15th, 2007: Respond

Previous posts about Programming Projects
Archives

Drop me a line! or, sign my Guestbook.
    •
Check out Ellen's writing at Patch.com.

What's of interest:

(Other links of interest at my Google+ page. It's recommended!)

Where to go from here...

Friends and Family
Programming
Texts
Music
Woodworking
Comix
Blogs
South Orange
readincategory