Archive for March, 2006

egopoly20060309

I haven’t been back to visit writely for a while. Boy, they have been busy. In addition to getting acquired by google, they have added some awesome features. Including blog posting (this post was authored and posted directly from writely) and PDF export. So awesome.

Make your own yum repository

If you are a Linux Fedora Core user, you might be familiar with the package management tool “yum.” Yum is nice, and similar to pacman (on arch) and apt (on debian/ubuntu). It’s a little bit annoying the way it has a huge (25-second) startup while it reads in and parse meta-data. But otherwise it works well.

If you have a lot of machines to keep up to date, however, it is inefficient to have all of them phone home to the mirror sites out on the net to update packages. At least it is when you are on a wimpy T1. I found this document on creating your own local yum repository. It is very succinct. I also found this one, which is way more wordy than necessary, but it gives more background, and includes info on seeding the base yum repository from the FC4 distro CDs.

The bad part of it is that you have to pay the one-time bandwidth pain of getting the entire FC4 updates repo mirrored to your own server. It’s pretty huge, at least 2GB.

For my own reference, this is what I am doing:

rsync -av --exclude debug --exclude=repodata/
          '--exclude=*debuginfo*' '--exclude=*i18*'
          '--exclude=*langpack*'
          'rsync://mirrors.kernel.org/fedora/core/updates/4/i386/*'
          /var/ftp/pub/yum/4/i386/updates/
createrepo -q /var/ftp/pub/yum/4/i386/updates/
repoview -q  /var/www/html/yum/4/i386/updates/

Dealing with accented character sets in MySQL

Here’s something I learned about today. Suppose you have a table of city names, and some of them are really the same city, but with alternate spellings like Skovde and Skövde. How do you find them?

Check out this awesome query:

select city, id, count(id) as cnt from city
  group by city collate utf8_general_ci
  order by cnt;

Anything with a “cnt” column > 1 is probably a dup. Then you can look at the individual entries and figure out what to do. (In my case, I have an alias table that I merge the dups into.)

The key to this is that you can change the collation rules in the table on the fly, which will decide that o == ö, for example. You could do the same thing with latin1 or other character sets too.

Digg is the new Slashdot

Digg is really becoming the new slashdot. The mission is basically the same: geeks yak about links. But the interface is so much cleaner, easier, simpler.

On the downside, it seems to be picking up slashdot’s religion/mob mentality as well: linux/apple/mozilla good, microsoft bad. Which I generally tend to agree with, but only on specifics, and not as a given.

Also on the downside, the ads on digg suck. They are google adsense ads, and they appear to have the worst targeting I have ever seen. For a site that has the traffic that digg has, they must be losing money hand over fist. They should have their own ad engine. I’ll bet their CPC is something like $0.15 -$0.25. They should be capturing $0.50 or more.

TextMate is a good editor.

I’ve been an emacs user for 20 years. Gosh, that is scary. Every now and then I try to use a different, “modern” editor or IDE for a while. Visual Studio. Borland JBuilder. Eclipse. TPU. (ha! just kidding. I used TPU before I used emacs).

I always end up going back to emacs.

Since I’ve been experimenting with Ruby on Rails, I’m trying TextMate. It has emacs-ish basic bindings, so it’s tolerable out of the gate. It has a nice, simple, but powerful extension mechanism, with a lot of pragmatic tools that cover all the languages I care about. It also has very nice Rails support, apparently because all the Railserati use it. Watch the video demo, and you might want to try it to.

So far, I’ve used it long enough to actually pay the shareware fee. I really like it. Let’s see if I’m still using it in a month.

Administrative: about page

I finally got around to writing an explanation of this web site. Consider this entry the official place to offer opposing views.

Software Update Heart Attack

I installed the latest security patch from Apple this morning. It required reboot (come on, Apple, quit it).

After reboot I could not log in with my normal username. We’re using an LDAP login on our network, so I figured it was some kind of hiccup with that. Not to worry, I thought, I’ll just use my backup (local) user account and see what’s what.

Oops, that one wasn’t working either. Oh crap. Did I forget the password?

Panic starting to set in. I have a lot of work to do today, and I don’t want to blow the morning doing an OS repair. And I certainly don’t want to endure the taunts of the Windows who sits at the desk on my left. Or the Linux user who sits on my right, for that matter. No problem, I’ll ssh in using my public key. That will bypass any password issues, LDAP or otherwise.

So I hopped on to my backup keyboard (connected to my backup machine, which happens to be Ubuntu Linux).

slayer% ssh buffy
ssh: connect to host buffy port 22: Connection refused
slayer%

OK. Now I’m freaking out. I really don’t want to pull out the install DVD. In desperation, I reboot again. That should make no difference, right? Wrong. Everything is fine on reboot. As if nothing was ever wrong. No trace of a problem can be found in the system logs. Ugh.

Lessons:

1. make sure you know your backup account password.

2. don’t accept reboot patches in the middle of the morning.

3. think seriously about switching to linux full time. (giving up itunes would be hard)

UPDATE: Derek just did this update on his mac, and it actually had a thing that said “ok you need to reboot one more time.” Looks like they patched the patch, and I am not nuts.