iPad HTML5 Video mime problem

I know. You have been beating your keyboard against your desk for hours getting that html5 video embed test working in MobileSafari on the iPad. You must have melted a small glacier re-encoding with every combination of container, encoding, and bitrate!

You checked and double checked your video tag. (You made sure to close the </video> and </source> tags right? Of course you did. You’re a professional after all.)

I know what the problem is. But I’m not going to tell you. Ok, ok, I’ll tell you, but only because I like you and I don’t want you to get fired.

Surprise! It’s your web server’s Content-Type header!

For some weird reason, browsers will disregard the mime type you explicitly wrote in the <source type="video/mp4"/> tag, and instead choose to trust the mime type coming from the server. For example, older IIS servers treat .mp4 files as application/octet-stream which seems ok to me, but simply did not fly with iPad.

Now how do you change your web server’s mime map? That’s between you and Google, buddy.

Turn your mac into a Pandora alarm clock

Here’s a tutorial for anyone wanting to turn their fancy new $2000 Mac into a $19.99 clock radio.

We’re going to use AppleScript, iCal, and the awesome PandoraBoy to get everything working. I thought this would be clunky at first but it’s actually really nice and flexible if you break things up the way I’m about to show you.

Read More
How to kill an unresponsive ssh session

I love stumbling on clean solutions to little annoyances I deal with regularly. Anyone who uses ssh on a regular basis definitely knows how this story goes.

You have all your terminal windows/tabs arranged exactly how you like them. Then BOOM, one of your ssh sessions hangs, making that entire window unusable. <CTRL>-C you say? Hah hah, I laugh ironically at your feeble term-fu. You have to either wait for the ssh process to properly die, or kill it manually from another session.

<RETURN>~.

No more! Just hit <RETURN>~. and ssh dies faster than Samuel Jackson in an underwater shark research facility.

Thanks Laszlo!

How to avoid accidentally zooming in Firefox with the mouse wheel

I got an Apple Magic Mouse recently and overall it’s quite nice. The momentum scrolling is an important evolution.

The momentum sometimes has side effects in apps that are not expecting it though. Firefox is one of these apps.

I tend to browse with many tabs open, and I like to switch between open tabs with control+tab and control+shift+tab (on mac).

The problem occurs when you flick your finger to scroll down a site and then immediately switch to another open tab with control+tab. By default, Firefox is set to “zoom” the site you’re on with control+mousewheel. Because of the momentum, Firefox still sees the mousewheel event when you press down control, and therefore starts zooming one or both of your tabs in catastrophic ways.

You can easily reset the zooming of a site by just hitting command-0 (zero), but it’s still annoying, and it happens more often than you would think.

Here’s how to disable the control+mousewheel zoom once and for all:

  1. Open a new tab and enter about:config into the address bar.
  2. Enter “mousewheel” in the filter textbox
  3. Look for any mousewheel.withXXXXXkey.action that has a value of 3 (3=zoom)
  4. Double click the 3 and change it to 0 (0=no action)

That’s it! No more inadvertent zooming. You can always set it back to default by right clicking the line you changed in about:config and choosing “reset.”

Don’t live with tiny annoyances, they add up.

How To Keep Your Data Forever

We’ve all sustained painful data losses at some point or another. After a number of years, you start to realize that you’re tired of getting sucker punched, and that you have the skill and knowledge to solve the problem once and for all. I’m going to outline here a relatively simple strategy to keep a set of data alive for the rest of your life.

Read More