Posts Tagged: code


20
Apr 10

Command Line Trash Can (Deferred Deletes)

I’m a Mac. I’m also an Ubuntu. I’m even a PC. In each of these, I have a pretty interface that lets me drag and drop just about anything to the Trash. Albeit an old, old feature that hardly ever comes in handy; when it does, it’s priceless. The thing is, I hardly ever use my GUI. Ever. I ride the command line like a drunken cowboy trying to prove something to the carneys. Given I really adore the concept of the GUI Trash deferred delete paradigm, I’ve added it to my command-line recipe book, giving it to me; GUI or not.

Continue reading →


16
Apr 10

Extensible Shell Environment Across Your Servers

One of my biggest frustrations any time I move to a new server: migrating to a new data center, changing jobs or simply adding new servers somewhere in between is keeping my customized shell environment while giving each server a bit of customizability. Of course, in a linux environment, we have our coveted .bashrc that will do this.  But what has helped me through this process time and time again is building my .bashrc to allow for server-specific extensions.  Here’s how I’ve done it. Continue reading →


15
Mar 10

Keeping Social While Forgetting About Social Networks

If you’re anything like me, you’ve subscribed to all of the recent social media trends.  Starting with MySpace, evolving to Facebook and throwing a little Twitter in there somewhere along the way with a sprinkle of Buzz at the end and a forgotten dabble of Orkut and hi5 to keep your palette tasteful along the years.  Even more is you, like me, have probably joined each of your favorites together with a smidgen of application glue so you only have to update one network before it propagates out to piss off the rest of the network nodes you now call friends.  Sleepless nights patrolling the internet, looking for something witty, interesting or off-your-rocker stupid.  Like a predator searching for his next meal in the desolate brush of an African terrain, you must show all your social friends just how cool you are in 140 characters or less.  Well NO MORE, my friends .. no more.
Continue reading →


2
Mar 10

Don’t forget your stems, smokey

Maybe I’ve been in this industry too long. Maybe I’m a complete moron. Maybe it’s a little shade of both and some of a third. Who knows. The point is that everywhere I seem to look, nobody knows about one of the most useful word matching algorithms. Not text matching as that’s a horse of a different color. Words. Word. The difference is subtle, but it is something that seems to come up a few times a year over the past decade for me, where if I had known about it earlier in my career I would probably have more hair now. The difference is this: word matching, you want to match near-exact gramatical terms. Not necessarily something that rhymes or sounds similar (that’s a something else entirely), but words that are one in the same with different suffixes. Yeah, it’s a little weird and out there, but it’s a problem that seems to bolster its head about every once in a while and knowing about Word Stemming will make your life just a little easier. Again, maybe everyone learned about this in their infancy and I’m just an idiot. Though, every time I use it in a solution, I surprise at least one person… hence why I bring it up now.

Continue reading →


1
Dec 09

Configure Your Web Server to Merge, Cache and Compress Dependent Js and Css Files.

It’s a well known trick by most developers and sysadmins alike to merge your static files into one another to reduce communication overhead between your servers and your coveted visitors. The premise is a simple one: if you require clients to download six JavaScript files, pipe them into a single file and have them download the single file instead of six. You just cut your static request cycle down by 83%. Good for you. The truth is, there are a lot of ways to do this as it’s a pretty well known and practiced concept. The problem is there has never been a simple; language, application and framework agnostic method of doing this with minimal (to no) intervention. They either suggest you use built-in functions like the following, injecting the JS onto the literal page:
Continue reading →