Javascript Markup Parsing

Q: Using javascript, how would one turn this:

Some text in *bold font* and _in italic_.

into this:

Some text in bold font and in italic.

A: Regular Expression Extract and Replace

var sourceText = "Some text in *bold font* and _in italic_.";
var parsedHTML = sourceText.replace(/(\*([^*]+)\*)/g, "<b>$2</b>");
parsedHTML = parsedHTML.replace(/(_([^_]+)_)/g, "<i>$2</i>");

VIM Reference Card — Improved

I’m a big fan of Ravi Shanker’s excellent VIM Reference Card. However since content on that card is ordered by commands alphabetically, sometimes it’s not very easy to find a command for what I wanted to do. So I made up this improved version of VIM reference card where commands are organized into categories: “Movement”, “Editing”, “Copy Paste”, “Completion”, etc.

Get it here

Install Leopard on Quicksilver PowerMac G4

I recently acquired a PowerMac G4 (800MHz, 768MB RAM, CDRW) and I want to use it as my computer at home. It runs Tiger just fine, but I wanted to put Leopard on it.

Attempt #1: External Hard Drive

Since the PowerMac doesn’t have a DVD drive, I naturally can’t use the Retail DVD to install Leopard. So I used SuperDuper to make a bootable copy of the DVD onto a external hard drive (and doing so would allow me to modify a installer config file that specific the Minimum CPU requirement). There is just one problem with this method: The PowerMac G4 wont boot from USB external hard drive — only Firewire ones — and I don’t have a Firewire external hard drive. Read the rest of this entry »

Blue Aurora Wallpaper Clock

A Wallpaper Clocks package based on the blue Aurora wallpaper from Leopard Server.

Download

My iPhone Plan: Current vs 3G (Fido)

I currently have the $25 Fido-to-Fido plan with misc. options. I did a bit of calculation and came up with this:

I think it still looks pretty good.

GMail Keyboard Shortcuts Reference Card

The version of shortcut reference on GMail’s website is too large to fit onto one page for easy reference. So I made a compact version here:

GMail Reference Card Screnshot

Download