Tag Archives: MLB

Adjust DD-WRT TX power

I had a DD-WRT router that was dropping a lot of packets. I got a lot of errors and that caused poor playback in Netflix and especially MLB.tv. It wasn’t a bandwidth issue. My wireless network connection was just too noisy. I had to adjust my DD-WRT TX power to fix it.

I probably adjusted it the opposite way you would expect. Continue reading Adjust DD-WRT TX power

Minor-League hacking in the MLB

So, about a year ago, the Houston Astros announced their internal player database had been breached. This week, more details emerged, pointing right at the St. Louis Cardinals.

It wasn’t a terribly sophisticated attack. You knew I’d write about this, but I’ll explore it from an IT security perspective more than from a baseball perspective.

Continue reading Minor-League hacking in the MLB

Stopping spam.

Forget what I wrote yesterday. I was going to post the stuff I wrote in Ohio when I realized it isn’t all that good, it’s definitely not useful, and the people who annoy me the most are the people who can’t get over themselves. No one cares what I ate for breakfast, and the only people who care what went on in Ohio already know.
So here’s something useful instead. It’s the coolest thing I’ve found all year. Maybe all decade, for that matter.

Spam begone. I hate spam. It wastes my time and my bandwidth and, ultimately, my money. I’ve seen some estimates that spam costs ISPs as much as $5 per month per account. You’d better believe they’re passing those losses on to you.

There are tons and tons of anti-spam solutions out there, but most of them run on the mailserver side, so for an end-user to use them, they have to set up a mail server and either use it for mail or run fetchmail to pull the mail in from ISP’s mail servers. I’ve done that, but it’s convoluted. But that’s trivial compared to setting up the anti-spam kits.

I was crusing along, vaguely happy, when my local mailserver developed bad sectors on the hard drive, so one day when I went to read my mail, I heard clunking noises. I turned around, flipped on the power switch to the server’s attached monitor, and saw read errors. Hmm. I hope that mail wasn’t important…

Eventually I shut down my mail server and put up with the spam, hoping I’d come up with a better idea.

I found it in a Perl script called disspam.pl, written by Mina Naguib.

It took a little doing to get it running in Debian. Theoretically it’ll run on any OS that has Perl installed. Here’s what I did in Debian:

su (to become root)
apt-get install libnet-perl (Perl couldn’t see the network without this, so the next command in this sequence was failing. This hopefully isn’t necessary on other distros, as I have no idea what the equivalent would be.)
perl -MCPAN -e shell (as per readme–I accepted the defaults, then when it asked for CPAN servers, I told it my continent and country. Then it gave me 48 choices. I picked a handful at random, since none were any more obviously close to me than others.)
install Net::POP3 (as per readme)
quit
cp sample.conf disspam.conf
chmod 755 disspam.pl

Next, I loaded up disspam.conf into a text editor. It looks just like a Windows-ish INI file.

The second line gives me an exclude list. It’ll take names and e-mail addresses. So I put in a few important names that could possibly be blocked (friends with AOL and Hotmail addresses). That way if their ISPs ever misbehave and get blacklisted, their mail will still get to me. Then I popped down to the end of the file and configured my POP3 mailbox. I had an account I hadn’t read in a week, so I figured I’d get a good test. Just drop in your username, password, and POP3 server like you would for your e-mail client. If you have more than one account, copy and paste the section.

Bada bing, bada boom. You’re set. Run disspam.pl and watch. In my case, it flagged and deleted about a dozen messages, typical of what I usually get, like mail offering me Viagra or access to horny cheerleaders or how to find out anything about anyone (which I already know–I have a journalism degree). The only questionable thing it flagged was mail from MLB.com. I can’t get off their mailing list ever since I voted online for the All-Star game. No importa, I never read that mail anyway. I could have always added MLB.com to my exclude list if what they had to say mattered to me.

But if you’re like me and get lots of mail–that was my less-busy account–and about half of it is spam, that stuff’s going to scroll by really fast. So here’s what I recommend doing: when you execute disspam.pl, use the following command line:

~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log

Then you can examine disspam.log. If disspam ever deletes something it shouldn’t have, you can add the person to your exclude list and e-mail them to ask what they wanted. It looks to be less work than deleting all that spam. Probably less embarrassing too. Have you ever accidentally opened one of those horny cheerleader e-mail messages when there were people around? Yikes!

I fired up Ximian Evolution, pulled down my mail, and had 15 new messages. No spam. None. Sweet bliss.

It’s just version 0.05 and the author considers it beta, but I love it already.

Unix’s power allows you to string simple tools together to make powerful ones. Here are some suggestions.

You can e-mail the log to yourself with these commands:

mail -s disspam [your_address]
rm ~/disspam/disspam.log

If you want the computer to do all the work for you, here’s the command sequence:

cronttab

Then add these entries:

0 0 * * * mail -s disspam [your_address]
* 0 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log

If you read your mail on the same machine that runs disspam, you can substitute your user account name for your e-mail address and save your ISP a little traffic.

You’ll have to provide explicit paths for disspam.pl and disspam.conf.

The first entry causes it to mail the log at midnight, then delete the original. The second entry filters your inbox(es) on the hour, every hour. To filter more frequently you can add more lines:


* 10 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 20 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 30 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 40 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 50 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log

This program shouldn’t be necessary for very long. It’s short and simple (4.5K worth of Perl) so there’s no reason why mail clients shouldn’t start incorporating similar code. Until they do, you run the risk of disspam and your mail client getting out of sync and some spam coming through. If you read your mail on a Linux box with an mbox-compliant client like Sylpheed or Balsa or Kmail, you can bring fetchmail into the equation. Then create a .fetchmailrc file in your home directory (name it ~/.fetchmailrc to ensure it goes to the right place). Here’s the format of .fetchmailrc:

poll SERVERNAME protocol PROTOCOL username NAME password PASSWORD

So here’s an example that would work for me:

poll mail.swbell.net protocol pop3 username dfarq password censored

Next, set your mail client to no longer check for mail automatically, then type crontab and edit your disspam lines so they read like this:

* 20 * * * disspam.pl disspam.conf >> ~/disspam.log ; fetchmail (your server name)

In case you’re interested, the semicolon tells Unix not to execute the second command until the first one is complete. If you have more than one mail account, add another fetchmail line.

As an aside, Evolution seems to use the mbox file format but it doesn’t store its file where fetchmail will find it. I think you could symlink /var/spool/mail/yourusername to ~/evolution/local/Inbox/mbox and it would work. I haven’t tried that little trick yet.

But even if you’re not ambitious enough to make it run automatically and integrate with all that other stuff, it’s still a killer utility you can run manually. And for that matter, if you can get Perl running on NT or even on a Mac, this ought to run on them as well.

Check it out. It’ll save you time and aggravation. And since it only reads the headers to decide what’s spam and what’s not, it’ll save bandwidth and, ultimately, it’ll save your ISP a little cash. Not tons, but every little bit can help. You can’t expect them to pass their savings on to you, but they’ll certainly pass their increased expenses on to you. So you might as well do a little something to lower those expenses if you can. Sometimes goodwill comes back around.

Dave gets a movie rental card

Faced with producing a documentary film, and faced with the increasing prospect of doing it on my own without help from people who know what they’re doing, I went on an excursion last night. Well, first I called up a friend to see if she was doing anything. She wasn’t home, so I decided to do something useful with my Saturday night: research.
I drove to Hollywood Video, filled out a membership form and handed over my driver’s license and a credit card. I came home with two installments of Ken Burns’ acclaimed Baseball series. I wanted to see how Burns did documentaries, particularly how he handled stills and mixed stills with old movies. So I grabbed the 1910s-1920s installment and the 1930s-1940s installment. Then I drove over to Wal-Mart and picked up a couple of frozen pizzas. Then I came home to watch and learn.

Burns usually shoots still pictures the way a cameraman would shoot a scene, either shooting the less-important part of the scene and then panning over to the important part, or shooting a panoramic view of the whole picture, then zooming in on the important subject. When faced with a good, well-composed and well-cropped closeup, he just lets it sit alone. On television, there’s no such thing as a still–the image will jump a little–so you can get away with that more than you might think. He added a little more life with sound effects and voiceovers. For example, when showing a picture of a sportswriter, he added a voiceover and the quiet sound of a manual typewriter. That’s an interesting trick I’ll have to remember–when you can’t engage the eyes with much, engage one of the other senses.

And what about transitions, the whiz-bang stuff that Premiere gives you so much of? If Burns ever used a transition, it was very subtle. Where I looked for transitions, I found only hard scene changes.

But for all his critical acclaim, I was disappointed with the 1910s-1920s installment. Babe Ruth Babe Ruth Babe Ruth Babe Ruth. I had to check the tape to make sure this was Baseball, and not a biography of Babe Ruth. Yes, Babe Ruth was (unfortunately) the most important player of that era. But Babe Ruth wasn’t baseball. He was a fat drunk who hit a lot of home runs mostly because he had a ballpark with a nice short porch in right field for left-handed hitters to hit into. And he mostly played right field, so he didn’t have to run around a lot. Yes, in his early days Ruth was a tremendous athelete. But he didn’t take care of himself, and had he played anywhere else, he would have been far less remarkable.

What did Ken Burns have to say about the 1929 World Series? Author Studs Terkel came on and talked about how his buddy had tickets to Game 1 of the series and wanted him to go. He didn’t go. Lefty Grove was expected to pitch. Instead, Howard Ehmke (who? Exactly.) pitched instead. There’s a story behind that, but heaven forbid Ken Burns spend 30 seconds telling that story when he can use that 30 seconds to show a package of Babe Ruth-brand underwear instead.

Screw it. I’ll tell the story. About mid-season, A’s owner/manager Connie Mack went to Howard Ehmke and told him he was letting him go. Ehmke was a veteran pitcher, but he was well past his prime, and Mack rarely pitched him–six of the other pitchers on his staff went on to win 11 or more games that year. Mack was a notorious cheapskate and was known to sometimes only take two pitchers with him on road trips, so far be it from him to keep Ehmke around and on the payroll when he didn’t need him. At that point, the A’s were World Series bound, with or without Ehmke, and the whole league knew it. (No wonder Burns didn’t talk much about the 1929 season–the only noteworthy thing Babe Ruth did that year was remarry.) But Howard Ehmke had never pitched in a World Series, so he pleaded with Mack to let him stick around just long enough to pitch in a World Series game. Now Connie Mack may have been a cheapskate, but he wasn’t a soulless bastard like so many baseball owners of that day and later days. He had compassion on his veteran pitcher and said OK. Now I don’t remember whose idea it was, but they even talked about him starting one of the games. Mack asked him which game he’d like to start. Figuring he had nothing to lose, Ehmke answered, “The first one, sir.”

Absurdity. The best pitcher in the game that year (and for most years to come) was one Robert Moses “Lefty” Grove. You play the first game to win, so you go find your best pitcher to go win it for you. So the whole world expected Lefty Grove would pitch Game 1. So the Cubs, expecting left-handed fireballer Grove, loaded up their lineup with right-handed power hitters. At the last possible moment, Mack announced his starting pitcher would be soft-throwing right-hander Howard Ehmke. Ehmke pitched the whole game. He won, too, striking out 13–a series record.

The 1929 World Series was one of the most dramatic series ever, with the A’s staging a gutsy come-from-behind victory in Game 4, scoring 10 runs in the 7th inning to overcome an 8-0 deficit. Lefty Grove came in to pitch the 8th and 9th and preserve the victory, notching his second save of the series.

But since Babe Ruth sat at home while all this was going on, I guess nobody wants to know about it. They don’t want to know about any of the colorful guys on either team either. Jimmie Foxx was the greatest right-handed home run hitter in the game before Mark McGwire came along. A converted catcher, Foxx would play seven positions at some point in his career. Whereas Ruth began his career as a pitcher for the Red Sox, Foxx wrapped his up as a pitcher for the Philadelphia Phillies. Like Ruth, he was always smiling. And he was one of the nicest guys to ever play the game.

The rest of the Philadelphia clubhouse wasn’t as nice as Foxx. Left fielder Al Simmons was a vicious hitter–arguably there were two things on that team meaner than Simmons’ bat, and those were Foxx’s bat and Simmons’ temper. It was a good thing the A’s didn’t lose much in those days, because after every loss, Simmons, hotheaded catcher Mickey Cochrane, and hotheaded pitcher Lefty Grove would redecorate the locker room. Connie Mack knew better than to go near the place until after they’d left.

As for Hack Wilson, the Cubs’ star center fielder, well, I’ve heard stories about him. It would have been nice to hear some new ones.

Hopefully we’ll find out a little bit about all these guys in the 1930s-40s installment. After the Yankee Dynasty of the late 1920s ended, the A’s Dynasty replaced it, and Ruth was retired by 1935–his last great season was 1932–so there isn’t much excuse to talk about him.

So while I was able to learn a fair bit about how a movie can come together and look good from discrete elements that are varied and sometimes damaged, I’m less impressed with Burns’ storytelling. To hear Burns tell it, you’d think the only teams that played baseball in that era were the Yankees, Red Sox, Yankees, A’s, Yankees, New York Giants, Yankees, the Chicago Cubs, Yankees, the St. Louis Cardinals, Yankees, and the Negro League teams, who rightly or wrongly got more screen time than the non-Yankees MLB teams.

Randomness for Sunday

Fairly busy day yesterday. I took care of some things around the ol’ crib yesterday morning, started writing up my take on Craig Mundie’s now-infamous speech. I think it’s ok but I’ll save it for tomorrow so I can give it another once-over–if you’re wondering what I have to say, I think Mundie missed the boat, and I think most of the other commentaries I read on it did too. Then I went to a friend’s graduation party. She walked this morning, so once the diploma comes in the mail, she’s officially edumacated. It’s hard to believe I graduated college four years ago this month. I’ve been out of college for as long as I was in.
So now I’m staying up late, watching ESPN’s MLB GameCast to see if the Royals can snap their four-game losing streak in extra innings, even though I have to be up early in the morning to do projection at the early church service. The Royals are like a pretty girl: They break my heart again and again, and I just keep coming back. That’s not very healthy, is it? But I’m smitten. I don’t want to get better.

Clustering for Linux. I’d lost track of this project. Mosix allows you to combine a bunch of PCs into one Linux cluster. Unlike Beowulf, any Linux app that doesn’t use shared memory will run on the cluster, finding the least-busy CPU.

I’d been planning to turn my now-idle 486 into a backup Web server; now I’m wondering if I wouldn’t be better off clustering it with my P-120. If I knew Mosix did failover, I’d do it in a second.

I’m sure there are tons of other applications for this. I probably should get some stuff together and play with it.

You’ll find it at www.mosix.org.

Another Greymatter site. And I see Jon Hassell’s had Greymatter up and running on his site about as long as me. That’s good to see. I’m sure it’ll save him buckets of time. I’m glad someone else is free from the Evil FrontPage Empire. From reading his recent stuff, it sounds like he’s fed up with more Microsoft products than just FrontPage. I hear ya, Jon.

I’ve had this going here about a week, and I’m extremely happy with the response. Everyday, non-search engine traffic is around its usual level. Discussion traffic is way up. And I see from the karma voting that I’m eliciting some reactions (yes, I know how many positives and negatives were cast). Speed on Friday wasn’t so good, but I came home to find my text editor had a runaway process that was chewing up 95% of available CPU time. That’s what the top and kill commands are for… So now that’s cleared up, with CPU usage hovering at a fairly constant 4 percent.