Chris.Weekly.org - A Web Space » 2008 » December

Chris.Weekly.org - A Web Space

My writings, photos, music and links

Mac Pro

My aging PC (a mostly home-built frankenstein AMD64×2 Windows XP box) crashed and burned last week. I had properly backed up nearly everything of importance (with a few painful exceptions) and decided it was time to get the Mac Pro I’d been coveting for a long time. After consulting w/ Mac-owning friends I settled on a refurbished 2.8GhZ quad-core from Apple, which arrived two days ago. It’s a gorgeous piece of hardware, inside and out, and I know I will appreciate OS X increasingly the more time I spend with it. I think it’s good for me finally to leave the comfort of XP. (In the last few years I’ve spent some reasonably happy months with Ubuntu, some wasted hours trying to get Gentoo Linux to work, and have played some w/ others’ OS X Macs, but most of my time has been spent in XP at home and at work.) The not-quite-the-same keyboard mappings are still bugging me, e.g. use of Alt instead of Ctrl to skip to the next word, and other off-by-one-key differences… I’m still using the same Logitech keyboard and a KVM switch to share it (and the mouse and monitor) across my work laptop and home machine, toggling back and forth… so the context-switching while likely good for me like broccoli is not much fun. Here’s hoping that becomes second nature soon! And there have been some annoyances, like wasting time finding the keyboard mapping for ejecting the optical disk tray (hold down F12 for a couple seconds — no button in the UI, no hardware button!)… but worst of all is not being able to read the backup USB drive. It’s FAT32 but large (a single 149GB partition). My XP laptop can read/write no problem, but for all its “I can do anything [PC] can do better” promise, OS X (a) thinks it’s NTFS when it’s definitely FAT32, and (b) can’t read or mount it. Argh. And it doesn’t seem to ship with a partition tool, even for an external disk. So I’m forced to use a *third party* OS just to access a standard hard drive formatted w/ the most ubiquitous easy filesystem of this decade. Fail. Anyway those gripes aside I’m psyched to finally be on a Mac and look forward to the improved UI and configurability and security and multimedia processing prowess it provides.

My friend Bill said my iPhone was a gateway drug. Heheheh.

posted by Chris at 10:00 pm on Wednesday, December 17, 2008

Dipping a toe

After a lifetime of standing on the sidelines watching the stock market (other than my 401k’s mutual fund allocations and Upromise/SLM employee shares) I decided it was a good time to learn more first-hand. So I set up an ETrade account and made a small investment spread across GE, CVX, GOOG and JNJ. I’m not expecting to see any gains for several years but I’m hoping the analysis I’ve read is right and this is a relatively cheap, relatively sane time to get started, in the grand scheme of things.

posted by Chris at 9:22 pm on Thursday, December 4, 2008

Apache mod_rewrite [E] flag

From the mod_rewrite docs:


‘env|E=VAR:VAL’ (set environment variable)
This forces an environment variable named VAR to be set to the value VAL, where VAL can contain regexp backreferences ($N and %N) which will be expanded. You can use this flag more than once, to set more than one variable. The variables can later be dereferenced in many situations, most commonly from within XSSI (via ) or CGI ($ENV{’VAR’}). You can also dereference the variable in a later RewriteCond pattern, using %{ENV:VAR}. Use this to strip information from URLs, while maintaining a record of that information.

I don’t know how I overlooked this for so long, but this is really useful. Instead of requiring overly-complex regex, tons of extra back-references and daisy-chained RewriteRules, with [E] you can just set these vars explicitly and use them when you need them. Nice!

posted by Chris at 3:22 pm on Thursday, December 4, 2008


Creative Commons License: Some Rights Reserved