Standard Mischief

Archive for February, 2007

*nix mischief: simple and crude web log analysis tools

At some point, I’m supposed to make the obligatory joke about my three readers. Instead, I’m going to share some command line pipes that any fair-to-middle *nix person should be able to figure out. Please note that even though I’m perusing my logs, I’m not doing any creepy crap with the data, and I’m not doing anything funky to readers with cookies or anything. Also, no IP addresses or other personal data were publicly exposed in the making of this blog post.

Although my stats program tells me that I get over 100 unique visitors a day, and it goes as far as breaking them down into spiders vs. “real people”, I’m not entirely sure I’m getting the whole picture. So grep to the rescue.

$ grep 'tailrank.png' access_log|grep '11/Feb'|egrep -o '^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})'|sort|uniq|wc -l

Real people arriving at a web page almost always load available images, while spiders, feed scrapers and hotlinkers usually don’t. So here, I’m going to use one of those below, adorable, social bookmark pictures as a “web bug”, (Wikipedia’s page, and the EFF’s page on them)

The first grep picks only lines that contain the image, the second grep restricts that to only entries for February 11th. The egrep selects only the part of the log entry that has the IP address, and then the list gets sorted, duplicate entries are removed, and at the end, we count the total number of lines. I’m getting 23 people for this date, although once, the IP address numbers were almost identical except for the last digit, so here we can assume that their IP address probably changed during visits that day.

Now for the people who read my feed.

$ grep 'GET /feed/ HTT' access_log|grep '11/Feb'|grep 'Mozilla'|egrep -o '^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})'|sort|uniq

The first grep restricts this to only people asking for my main feed, next restricts to just February 11th again. The third only selects the ones that have “Mozilla” in the user agent string. Then it’s sort and remove dupes again. Here I’ve got six, but I’ve got one overlap with the earlier query, so I’ve got 5 for this day

$ grep 'GET /feed/ HTT' access_log|grep '11/Feb'|grep -v 'Mozilla'|sort|uniq

This one restricts the log to only spiders and scrapers, but gives me the entire user agent string on each one. Bloglines and NewsGatorOnline have the decency of informing me in the user agent string that I have one subscriber with each. The rest are spiders and such, mostly for search engines, and I don’t count them as real.

It’s a snapshot of just one day and does not take in to account of someone who might read my aggregated feed at say Bloglines and also come visit with their browser, nor does it detect someone who might read me both at work and at home, or at two different wi-fi hotspots, but still, I have a pretty good idea of my total readership.

Credit where due: The crude regular expression I used above, (crude, because it would hit on a dotted quad such as 999.999.999.999), came from here.

2007-02-13 08:00 by Standard Mischief, Filed under:don't try this at home     No Comments

Road salvage

found objects from a road hike

The picture on the right shows a few found objects from a seven mile road walk yesterday. It’s clickable, if you want a better look. I saw four wheel-weights, which will end up going into my strategic lead reserve. That’s not really notable because I always seem to find wheel-weights. Of perhaps a bit more interest was the velcro-mount visor CD caddy. Inside I found the traces of six CDs. Three of them were commercially pressed, and all three of them were cracked and useless. There were also three home burned CDs, and every single one of them survived the impact and play fine. Odd.

2007-02-12 14:00 by Standard Mischief, Filed under:found object     No Comments

Help with wrangling WordPress: a pretty good resource

I sure wish I had read this webpage before I moved/upgraded my blog. It’s a little dated, but still has useful visual style tutorials on PHPmyAdmin, moving your blog around on your domain, moving it to another server, and a bunch of other stuff. Worth checking out.

2007-02-11 12:00 by Standard Mischief, Filed under:deranged rants     No Comments

Christopher Soghoian puts it succinctly

Christopher Soghoian puts it succinctly:

I’ve had two conversations in the past few days – where I have sought advice from super intelligent and seriously kickass legal experts – and both of them have ended with me receiving a sharply worded (yet friendly) warning:

The law is not a machine. You cannot find a loophole in it in the same way that you would with a computer algorithm. The law is pliable, and if a judge wants to rule against you – he’ll find a way.

As plain and simple as this may be, I’m still struggling to get my head around it.

(emphasis mine)

I suppose it’s true, and I also have had other people try to explain this to me, but I’ve also had a hard time getting my head around it.

I’ve mentioned before how Ed Rosenthal and the city of Sacramento turned a federal law on it’s head. The law was an attempt to allow local police deputize someone so that they could buy and use drugs undercover to facilitate those big newsworthy drug busts. Instead, Ed was duly deputized and then proceeded to grow and distribute medical marijuana to medical patents. Everything was done legally under state laws, and arguably under federal laws too. However, during the trial, the defendants counsel were forbidden to mention their specific legal theory, and the judge impaneled a jury of meat-bots [1] and he was convicted. Yet the outcry afterwards was so loud that when sentencing came around, the judge broke the law that required a minimum mandatory sentence of five years, and gave Ed his freedom back with only time served.

That’s just one example. So it pretty much means that our legal system, designed to be “of, by, and for the people”, is horribly broken. Even if you’ve got the Constitution on your side and can afford the expert that can deduce the precise legalese language, cross all the eyes and dot all the tees on your writ of habeas corpus, it all usually doesn’t mean a damn thing if the judge or the state wants to take you down.

Since this lay-person’s efforts to grok our justice system is a reoccurring theme in my blog, I’ve decided to make a new category, “A government of laws and not of men”, and more than likely move some of my previous post over there too.

[1] Click for more of what I mean by “meat-bots”.

2007-02-09 17:00 by Standard Mischief, Filed under:A government of laws and not of men, deranged rants     No Comments

Sometimes I wish there were Orbital Mind Control Lasers

Orbital Mind Control Lasers, at least would explain a few things. I’m going to slip in a fnord bleg here, but this bleg is actually a rhetorical bleg because I’ve asked already, perhaps a dozen times, and no one wants to pick up the ball and run with it.

So, you strong supporters of Roe, (which I’d like to remind everyone has a cornerstone in the implied inalienable right to privacy, specifically medical privacy), seeing as you would never willfully dilute Roe, why would you ever support a scheme like (take your choice of terms) Hilliary Care, universal health care, single payer heath care, or state-run anything health care?

While you are chanting “keep your laws off my uterus”, why would you think of any scheme that would digitize your medical records and transfer control to the state for universal access to be a pretty neat idea? Why would you not be immediately suspicious of abuse?

On the issue of the day, why, while you are thinking “my body, my choice”, would you ever support mandatory beta testing of the new HVP vaccine for Texan school girls?

Sunni Maravillosa brings up just about every objection I’d like to bring to your attention, (so I don’t have to), including the notion that this vaccine is “throughly tested and absolutely safe” is based on the human trials of less than 2000 girls.

The only point she doesn’t bring up is that the governor of Texas bypassed the legislative branch and issued the edict via an Executive Order. Uh yea, what separation of powers?

Oh, and I know that there are a few fscked up people out there that would wish to deny this vaccine to people, if they could, because of strange ideas they hold about premarital sex and hellfire and damnation and all of that, but an uncompromising stand on everyone’s personal body autonomy is so far more the important issue here.

2007-02-08 14:25 by Standard Mischief, Filed under:deranged rants     2 Comments
current.png

Powered by WordPress , Theme Ported to Wordpress by Liu Xun. Original Design by Cathayan