Migrating from Movable Type to WordPress

Switching your blog from Moivable Type to WordPress can be a real challenge, especially if your URL structure has changed.

In my case, our blog posts were previously /blog/year/month/post_name_with_underscores.html and under WordPress were going to be simply /post-with-hyphens/

While there are many a fancy regex one can setup in their .htaccess file for 301 redirects, they often involve looping through a recursive regex to replace each individual underscore with a hypen, and then other regexes to do the rest of the work before finally redirecting.

There had to be a better way… Continue reading “Migrating from Movable Type to WordPress”

ClickBank Instant Notification Service in Perl

ClickBank is generous to provide code examples for many implementations of their Instant Notification Service, but… they don’t include Perl for some reason.

Here’s my Perl implementation.

use CGI;
use Digest::SHA1 qw(sha1_hex);
use Encode;

$q = new CGI;

sub ipnVerification() {
  my $secretkey = 'YOUR SECRET KEY';
  my $pop = "";

  foreach $field (sort($q->param))
  {
   unless ($field eq "cverify") {
      $pop .=  $q->param($field) . "|";
    }
  }
  $pop .= $secretkey;
  my $calcedVerify = sha1_hex(encode("utf8", $pop));
  $calcedVerify = uc(substr($calcedVerify,0,8));
  return ($calcedVerify eq $q->param("cverify"));
}

Enjoy!

Hiking Camelback in Phoenix

Summit of Camelback at InfusionCon 2011
Summit of Camelback at InfusionCon 2011

Last year at InfusionCon, Jon Goldman asked if I wanted to climb Camelback the next morning in time to catch the sun rise from the head.

I blurted out YES before he could finish giving me the details and the next morning we found ourselves heading out of the resort around 5am.

This year at InfusionCon, a group of us planned a Sunset climb up to the hump of the camel and got together quite a group for what proved to be a challenging, fun and gorgeous ascent. Continue reading “Hiking Camelback in Phoenix”

Disney’s Secret Vegan Friendly Menu

Vegan Popcorn in Disney
Jeremy Shapiro Enjoying Vegan Popcorn in Disney World's Magic Kingdom!

Disneyland and Disney World have tons of food to keep the whole family happy, but I recently discovered they also have food to keep us vegan folk fat, happy, fed and loving Disney.

What follows are far from healthy options, but they are vegan options. On second thought, Disney doesn’t have much for healthy food, no matter what you eat.

Any place that serves food also has a small binder with all ingredients, allergen warnings and more. Even the popcorn cart has a binder and YES the popcorn IS vegan! (win!) Continue reading “Disney’s Secret Vegan Friendly Menu”

How To Attach an Ice Axe to Your Pack

Ice Axe attached to an Ospey PackWhen you bought your pack, it may have had a loop (or two!) on the bottom to hold your ice axe(s), but… how do you attach the axe to your pack?

I never knew how myself, but on a recent snowshoeing and backpacking trip, George showed my how and the solution rocks!

First, drop the ice axe down through the loop, so the head is above the loop and the shaft is through and below the loop with the pick side facing the middle of the pack.

Now fold it up and secure it to your pack using whatever the manufacturer put in line with the folded up shaft. Continue reading “How To Attach an Ice Axe to Your Pack”

[Errno 32] Broken pipe in s3cmd

Broken Pipe in s3cmdI’ve been looking for a fast and easy way to deal with Amazon S3 from a Unix command line prompt, and came across s3cmd which seemed great, until it didn’t work.

After running s3cmd --configure to configure it and then running a test successfully, I tried to upload a file usingĀ  s3cmd put filename s3://bucket/filename and got an error, specifically [Errno 32] Broken pipe.

The program would continually throttle the upload speed and retry until it couldn’t get the file up at any speed, no matter how slow. Continue reading “[Errno 32] Broken pipe in s3cmd”

Fun Pyramid Set Math

Push Up PyramidsIf you’re doing work out sets with a pyramid, i.e. 1, 2, 3, 4, 3, 2, 1 , there is some really cool math to figure out your totals, or work backwards from a total to get your max count in the pyramid.

Pyramids are a great way to increase your max rep in a given set, for example in pushups, pullups, and situps. For example, with a maximum number of reps at 5, you can knock out a total count of 25.

Now, for the fun math. Continue reading “Fun Pyramid Set Math”

Building a Snow Cave

Building a Snow Cave
The view from inside our snow cave

So you wanna build a Snow Cave? Thankfully it’s a lot easier than I thought – easy as in not complicated, that is. Building a snow cave takes a lot of hard physical labor, but is well worth it in the end as you have a comfy, flat, dry, above freezing home for the night.

This weekend, George, Greg and I ventured off to into the great outdoors for two days of snowshoeing and winter backpacking with some big ideas of how we could spend the night.

On Friday afternoon, I had read about the IceBox which unfortunately is only available online from REI and occasionally at their flagship store in Seattle. The IceBox is a brilliant invention which allows for the creation of perfect igloos, even with less than ideal snow. As I would not be able to acquire this in time for our trip, we had to make do with building a snow cave, and hauling in a 3 person tent and tarps in case that didn’t work out.

So where do you learn how to build a snow cave? Continue reading “Building a Snow Cave”

Extending the Battery Life of Verizon Android Phones

Android Low BatteryIf you have an android phone such as the Droid or Incredible, you know how horrible the battery life is. If you don’t touch the phone all day, you MIGHT make it to lunch time before needing to recharge it.

Thanks to Terry, I now have two backup batteries and a dedicated wall charger for spare batteries with an extra spare battery in my pocket at all times for when I’ll be away from a wall outlet for more than 4-6 hours. Sad, I know.

The good news is that I discovered a fantastic way to extend the battery life of your android phone on the Verizon network. Continue reading “Extending the Battery Life of Verizon Android Phones”

Reducing PDF File Sizes on OSX

ColorSync UtilitySometimes when I print a file to a PDF, the resulting file is HUGE. There’s no reason for a print-ready 1 page, mostly text page made in Microsoft Word to be 7 – 40 MB.

Fortunately, there’s a little-known, but super-effective solution to reduce the size of your PDF files dramatically.

Open ColorSync Utility (search for it using spotlight) and then drag your PDF file to the ColorSync Utility icon in your dock to open it. From there, you’ll see a drop down on the bottom left.

Choose Reduce File Size and click Apply. Save the file and note the drastically reduced file size. I’ve gone from 7MB to 500kb with two clicks and even better in some cases.

Goodbye bloated PDFs!