July 2005 Archives

mkid-like hack for spotlight

| 1 Comment

If you ever used the "mkid" package for finding references to functions in source files, you might appreciate this. I've tried to get the mkid package to compile on Mac OS X, but with no luck. It doesn't work that great with java, anyway, and has fallen into serious neglect. I guess everyone uses fancy IDEs nowadays anyway.

In any case, spotlight has a command line interface called mdfind. Try this little trick in your emacs. First, visit a source file at the top of your source tree. Then do M-x compile and give this command:

mdfind -onlyin `pwd` "println" | xargs grep -n "println"

Substitute whatever function or class or method you want for "println." Then use M-x next-error to walk through all occurences. Add key bindings and macros and have some refactoring fun.

yagooglehoo!

| 2 Comments

Yahoo and Google should merge. Yahoo has some great services like premium mail, web hosting, media stuff, etc. Google just crushes them, though, on application development that centers around search and organizing information. The combined entity might actually have the power to really threaten Microsoft, which I don't think either has separately.

With the spare change on the floor, they could buy apple and tivo and have a good foothold inside the home/small business as well as on the net.

If this happens I want 0.0001% of the merger value as my investment banking fee.

Setting up a reliable server

Usually when I set up a new linux computer system, my goal is to make the cheapest thing possible, and set it up as simply as it can be. The main idea is that if the hard dies or something, it's easy to just replace the dead machine with an identical clone in a short period of time. Of course, administrative scripts, recipes, and BACKUPS are key.

I am starting to put together a server for my wife's business. For various reasons, the cheap throwaway strategy won't work in this case. Part of it is the business cost of any downtime, part of it is the fact that there is no on-site IT staff (i.e. me).

So I'm actually putting together a highly available, reliable server. I'll document how it comes together here.

For starters, I bought a semi-fancy Dell 2800 series tower server. It has dual CPUs, dual power supplies, dual network interfaces, 2GB RAM. It has a split SCSI backplane with hardware RAID 1. I've had it configured so there are three logical drives, each of which are made out of two physical disks.

Logical disk 0 is the operating system. I'm starting with Arch Linux, which is a nice distribution that uses a debian-style package management system called "pacman". It's nice because it's all command-line based.

Logical disk 1 is the application software and database disk pair. It's 75 GB logical disk, which should be 10X what we actually need.

Logical disk 2 is a 300GB storage unit. The application we will be installing has document management and imaging capabilities, and this is where that data will be kept.

Finally, I have a dual backup strategy planned. First, there is a big, fancy, painfully expensive digital tape system that as a 200GB capacity. Then, I have a cheapo server that I am building, which is a $399 low-end dell server with 4 big SATA disks. This will give me over 1TB of network disk for over-the-network backups at a total cost of less than $800.