August 11, 2006

As mentioned briefly before, tomorrow the girlfriend and I are headed out on a cruise to the Western Caribbean and so you can expect this space to be dead for at least the next week. Not sure what my net access is going to be like on the ship, but something tells me I'm not going to be able to convince myself to fork over the $22/hr they charge for it (yes, that's the actual rate; utterly ridiculous), no matter how many Margaritas I have in me. It's a coin toss as to how my brain will react to the deprivation.

The end-goal is to simply relax (easy to say, but...), which will involve me stuffing my face, thinking about the bar as little as possible, and taking some [hopefully] unbelievable pictures.

I've much to post when I get back, so hold your breath and I'll see you in a week.

Introducing Prolific for WordPress

August 10, 2006

Well, I've just put the finishing touches on yet another WordPress plugin (my fourth). This one basically gives you a word count of all the posts in your WordPress weblog and updates itself automagically each time you publish a new post. To download the source, please see the project page.

The impetus behind the plugin was speed, or rather, the lack of it. I whipped up some simple PHP a couple of years ago to extract a word count from WordPress, a statistic I keep on the archives index, but because of my Smart Archives plugin, that page takes a few seconds to load (I don't think it can be made any faster) and any extra time spent calculating the word count was only adding to the delay. Though WP-Cache has pretty much made the speed hang-up a non-issue, I still didn't like the fact that I was calculating the word count each time the page expired from the cache.

I didn't want to call it a "plugin"

I'm fully aware that this is a niche plugin if there ever was one, but if you are a stats junkie like me you'll likely appreciate it.

The tour page is up

August 10, 2006

The tour is finally complete. After deciding how I was going to lay out the page (something I finalized months ago; it's nothing groundbreaking), I was left to sift through my posts and find those I wanted to use on it. This actually took me a very long time and the page's posts will probably remain in flux indefinitely.

After struggling to find a usable solution for presenting post excerpts that (1) was non-destructive and (2) didn't require me to mark within a post where I wanted the excerpt to end, I just decided to run the full posts, which, after really thinking about it, is the only thing that makes sense anyway.

Let me know what you think.

A gadget-free futurism

August 08, 2006
A gadget-free futurism. "A preponderance of focus on emerging technologies leads one to start thinking of technology as a neutral driver of change, rather than as a material manifestation of social values. More often than not, the emergence of new forms of technology is less a catalyst for social change than a result of it."

Teaching Image Magick who's boss

August 07, 2006

A few days ago I asked if anyone knew how to get "either Image Magick or NetPBM to create square thumbnails built from the largest square that can fit inside the center of the original image?"

While I received a few e-mails from others wanting the same, no one had a solution for me and so I had to fight off empathy and figure it out on my own (even though I was told it couldn't be done). I would have typed this up sooner, but a good friend of mine is currently working with a new social-networking startup and thought that I might be able to use this (+ some other Image Magick/PHP voodoo) to make a quick buck, and so I had to wait for that situation to resolve itself.

Without getting into the details and at the same time gracefully skirting around how much time I spent on this, I'll just show you the command and tell you what you need to change if you want to do it for a larger/smaller thumbnail.

convert filename.jpg -thumbnail x170 -resize '170x<' -resize 50% -gravity 
center -crop 85x85+0+0 +repage newfile.jpg

The above is for an 85x85 pixel thumbnail. Notice that the first two numbers (the 170s) are twice the width/height of the final thumbnail I wanted to create; given those relations you should be able to deduce what you'd need for a different sized thumbnail. Note that this command sequence also seems to work quite well for portrait images (i.e., where the height is greater than the width).

Prettify your shell prompt

August 05, 2006

I've used the same shell prompt for ~10 years now. 10 years. The colors I use come from an old IRC friend's bash configuration utility (I probably have the script source buried deep in some archives somewhere).

You'll notice that the prompt tells you the current user's username, the hostname of the machine, and the current folder.

shell prompt

If you'd like something similar, simply place the following line in the .bashrc file of your home directory.

\W[\03[1;36m>[\033[0m] "

Realize that it should all be a single line (I broke it here so that it would fit nicely and be a bit easier to read).


August 03, 2006

You know, I don't know what it was about studying for the bar, but it really seemed to force me into some serious self-reflective moments and not a day went by that I didn't semi-consciously drift into a daydream about my past. I really thought a lot about where I'm at in my life, all the wonderful experiences I've been fortunate enough to have, and all of the incredibly crappy things I've somehow managed to overcome (externally at least). It really is a small wonder that I'm here, in California, on the cusp of beginning my career at a prominent IP firm.

It's been an awfully wild and tumultuous ride, this life thing, and it's just incredible to sit back and think about all that's happened and how all of those things have, for better or for worse, shaped me into the person I am today. It's overwhelming.

I can only imagine what it must feel like to think similarly of your progeny. I'm going to act like such a girl when I have kids, I just know it.