Archive for June, 2008

Offline: The Silly Script Disaster

I have several websites. The way my web host has them set up, like many hosts who use cPanel, is that one site is a “master” and the others essentially exist as directories within that site. My master site is smallaxesolutions.com, which is the “company” under which I sometimes do my web design and network support business.

One of the things I (used to) do as Small Axe Solutions was publish the core code of the engine that powers firsttube.com, Small Axe. Small Axe code was built up as 0.1, then 0.2, then 0.3. At that point, I had added several features to firsttube.com that I had yet to merge upstream into Small Axe. So, I created a build system so I could slowly integrate the changes. In short, it worked like this: I had a directory called “build_source” which contained my current code. Of course, it had all kinds of problems out of the box, like the config files which pointed to nonsensical location like /path/to/your/blog/. It had no valid database connection info. The flatfiles were unwritable. So, in short, the code was (usually) solid, but PHP couldn’t compile it.

Meanwhile, another directory called “demo” was waiting silently.

Lastly, a third directory, outside the web root, called “static” was sitting with pre-built config files, db connection files, and some other stuff.

Then it was just a matter of a simple shell script. The script did the following: it deleted everything in the “demo” directory. Then it copied all of the files in the “build_source” directory into the demo directory. It deleted the config file and overwrote it with a copy from the “static” directory. Same for the db connection and a few other files. It left the demo directory as a live, fully functional build of the current code. Then it zipped everything in the “build_source” directory and put it into my downloads section. It ran this script every 30 minutes for probably 2 years now. I only chose 30 minutes because it made sense from a development standpoint to see the updates quickly. I stopped working on that version some time ago, but never got around to updating or changing the script.

Fast forward to a few weeks ago, I was cleaning out a bunch of old directories. Within 5 minutes, EVERYTHING was gone: my mail, *all* of my sites, my temp files, everything in my home directory that wasn’t a hidden file preceded with a dot. I didn’t realize this for several hours, but I then I restored from a backup and within 45 minutes, everything was gone again! Oh noes!

I immediately begin researching security and disabling all of my upload scripts. Something is wrong, I thought. I searched high and low. But, as you guessed, I didn’t find anything wrong, because there was nothing wrong. In my cleanup, as you may have gussed by now, I decided to delete the “demo” folder. The first line of my shell script is “cd /home/adam/public_html/build_source.” Then second, scary line, is “rm -rf *“. Since there was no “build_source” folder, the first line flat out failed, leaving the script in /home/adam. Then, unfortunately, it ran rm -rf * in the root of my home directory. Killer!

It took my some time to swallow my own stupidity. All I had to do was comment out the cron job to prevent this disaster. But alas, I dropped the ball. We’re back online now, and a little smarter.

Google Slips on SLL Renewal

It happens to us all. We network folks admins have a lot of responsibility put on us that no one else understands.

Google is sometimes seen as the company who can do no wrong. Well, they’re human, and it’s time to hire someone to do your administrative work, boys.

Peace at 7AM in Florida in the Summer

It’s been awhile since I’ve last written largely because I’ve been so busy. But I have to record this one passing thought. I woke up today, a Sunday, and walked the dog at just before 7AM. The sun was out, but not too hot yet. The birds were chirping, but no humans made any noise or could be seen. No one had yet begun mowing their yard or washing their cars. It was just the dog, the birds, the sun, and me.

I’ve tried meditation. I’ve tried deep relaxation. But honestly, right now, nothing I know of can beat the natural, organic peace of 7AM in Florida in the Summer.

Cooking With Cocoa and Chilis

Since I’ve been learning a little more about cooking, I’ve been trying to focus a little less on just grilling meat. Aside from a 2.5 lb prime grade cowboy cut ribeye that I burned the other day (it was salvagable once I trimmed away a black layer), I’ve got the grilling thing mostly down.

So I started really looking into different dishes than I normally would make and I focused on using non-traditional exotic spices like Garam Masala. This week we started playing with cooking with cocoa and chilis. It’s farily common knowledge in the culinary world that cocoa powder and chilis complement each other. Even the Mayans used chilis in their hot chocolate. And now Lindt makes a chocolate bar with chilis. So we tried two dishes.

First was cocoa chili steak. It was a choice ribeye crusted with cocoa powder and crushed smoked chipotle dust had a sweet and hot aftertaste. The butter dripped tri-color rotini was a nice complement.

A much better example of the combination was the cocoa chili chicken mole pronounced (MOH-lay). The mole was entirely unique, the taste was both sweet and chocolatey, the cocoa was unmistakable. That said, every bite had a very slight aftertaste of chipotle. I’m not much for spicy hot food, but the post-bite burn was just enough to make it interesting. I was really happy with the tender sweet potato and the vidalia onions, which had absorbed so much of the sauce that they had a very sweet flavor. Overall, I was impressed with this recipe.

Blinking Images With Javascript

I needed to have an image blink in one of our intranet applications today, so I wrote this quick javascript to accomodate. There aren’t many good image blinker scripts online, so I’m adding mine to the mix:

Start by adding this to your javascript file:

function blinkId(id) {
	var i = document.getElementById(id);
	if(i.style.visibility=='hidden') {
		i.style.visibility='visible';
	} else {
		i.style.visibility='hidden';
	}
    setTimeout("blinkId('"+id+"')",1000);
	return true;
}

And this right before you end your <html> tag:

<script type="text/javascript">blinkId('YOUR_ELEMENT_ID');</script>

This will work for images, divs, spans, pretty much any block level element with an id.

Updated 8/19/2008: Fixed a copy/paste bug in this post.

Exotic Meat Party

Last night, three of my friends and I got together for an “exotic meat” dinner. Below is the proof and a short write-up of each meat.

First Course: American Kobe Beef

American Kobe beef is an off-shoot of Japanese Wagyu beef. It is super tender, exceedingly well marbled, and delicately flavorful. This steak was a top sirloin, not typically one of my favorite cuts. However, it came out beautifully, and tasted fantastic both raw and cooked.


American Kobe top sirloin

Second Course: Elk Tenderloin
Elk is a delicate meat that can be gamey if not properly prepared, but I have found, in my limited elk experience, that it can be an amazing dish if done right. We made ours in a beef and cream sauce, heavy on the tarragon, with carrots. The tenderness, no doubt, can be attributed to the cut more than anything, but the fantastic texture can only be described as buttery soft, and the flavor, while suggesting a hint of game, was uniquely tasty. A lamb lover, I think, will appreciate elk’s flavor.


Elk Tenderloin

Third Course: Buffalo Steak
Buffalo and bison meats are not quite as exotic as some of the forthcoming meats, but they both have a slightly sweet taste to them that makes them very similar to beef. We coated our steaks in chimichuri and grilled them to medium rare. I found this particular steak “good,” but not great. I don’t think it was just the cooking style – I love chimichuri and the steak was perfectly cooked.


Buffalo Steak

Fourth Course: Roasted Llama Steak
The Llama steak was one of the scarier meats for me in this process, because I have a problem picturing it as not gamey. I wasn’t able to find any grilled llama recipes, but I wish we had braved it anyway, because I think it would have been better than the “sweet onion roast” we chose to use. The llama was prepared like a roast, seared stovetop then cooked with onions, carrots, garlic, salt, and a slew of other goodies for about 12 minutes. The resulting steaks were fairly neutral tasting. They were distinctly not familiar meat, but not especially odd tasting. The llama steaks might be fantastic if cooked better, but in our preparation, it was just a little too much like a poor quality steak from the round or the chuck that just didn’t cut it. I didn’t need a third bite to know that if I ever eat llama again, it won’t be via that recipe. I think next time through, I might season the steaks and grill them.


Roasted Llama

Fifth Course: Yak
Having never had yak before, I envisioned it as a gamey and tough meat. I used a modified tenderloin recipe and adapted it for what were essentially trimmed strip steaks. The yak bits were seared in a saute pan, then crusted with dijon mustard and a custom breadcrumb mix, then seared again to brown up the coating. The yak was served medium rare.

Surprisingly, everyone liked the yak and three of us finished our entire portion. The yak was neither gamey nor tough, and was actually quite enjoyable. The meat has a uniquely stringy texture, rich yet unassuming, beefy but still humble. It was both flavorful and tender, certainly not something you’d mistake for beef, but not altogether crazy tasting at all. If you’re interested in exotic meats, but tentative about some animals, yak is a pretty exotic one with an incredible accessible flavor.


Yak Medallions

Sixth Course: Frog’s Legs
Frog’s legs are not very exotic – they are available in many places – and they are pretty tasty in general. This was, however, my first time frying them at home. Previously, I’d baked them in a slight olive oil drizzle much less successfully. This time through, we battered them and fried them, as they are usually found. The frog legs were tasty – I had one fishy bite that I wasn’t too happy with, but other than that, they were very good. Frog legs have the texture of a whitefish, but really do taste like much more like chicken provided they are well washed and properly cooked.


Fried Frog’s Legs

Seventh Course: Rabbit Loin
Rabbit is, again, not terribly hard to find at a decent supermarket. Many butcher shops either carry it or can order it at a reasonable price – maybe $10-$15/lb. We marinated our rabbit loin in oil, red wine vinegar, paprika, and other spices. The directions called for grilling over indirect heat for 35 minutes(!). Knowing it seemed long, we let it cook for most of that chunk and were a little upset by how dry the meat was upon serving. The rabbit was mostly a miss because of the prep.

There is both dark meat and white meat in a rabbit, and although I generally prefer white meat, the dark meat is very tasty.


Rabbit Loin

Eighth Course: Snapping Turtle
We all confessed to being terrified of the turtle meat. First off, the turle looked disgusting in its frozen, freeze dried form. Secondly, it’s not easily accessible; the pieces are all random chunks in odd sizes and often you can see where it comes from. It’s easy to spot a leg or foot, the backbone, the neck, etc. And it’s scary.

The turtle had a slight lakewater smell to it on defrosting, and we were instructed to marinate it in lime juice before cooking. Marinating is a common was to remove gaminess, people often soak fish in milk, for example. After grilling the turtle, I can assure you that milk would have been a better choice, because the turtle tasted like lime meat. It seemed to have so little flavor of its own, but when you did taste turtle, it was just dull, gray meat. I do not have to have turtle again, but if I do, it will certainly be in a stew, which is a much more traditional preparation.


Grilled Minnesota Snapping Turtle

Overall, it was a great experience and it was a lot of fun. Our next order will likely be more common fare. We’ve discussed alligator tail steaks, rattlesnake, and python, but we’re also tossing around the idea of order real kobe beef rib meat, the kind that costs well over $100 a pound. Nonetheless, having had so many meats for the first time was a great man-style adventure, one I recommend to the culinarily adventurous.