Recovering blindfolded

The video card on my boss’s WinXP laptop fried. Could barely even see the cursor. I’d hoped to plug it into my iMac via Ethernet, turn on Internet Sharing, and copy everything off the HD. Hmm… that didn’t work. Samba on WinXP is an abomination.

What about just copying to an external HD? Well, I wanted to grab all the data, and Windows DEP wouldn’t let it go. Plus the external HD was HFS+ formatted, and I didn’t feel like wiping it.

Here’s what happened instead, using the physical connection described above:

Laptop

  1. Boot with xUbuntu LiveCD
  2. Open Terminal
  3. sudo apt-get install openssh-server
  4. sudo passwd ubuntu
  5. Enter a simple password twice

That was enough squinting at a corrupted screen.

iMac

  1. ssh ubuntu@192.168.2.2
  2. sudo mkdir -p /media/win
  3. sudo fdisk -l
  4. Note the NTFS disk ID (Mine was /dev/sda1)
  5. sudo mount -t ntfs /dev/sda1 /media/win
  6. exit
  7. mkdir ~/laptop/
  8. scp -r ubuntu@192.168.2.2:/ ~/laptop/

Stupid Magento tricks

And here’s how you can be lazy about skin and CSS inheritance too:
dan:plentio danrashid$ pwd
/Users/danrashid/Sites/plentio/skin/frontend/plentio
dan:plentio danrashid$ ls -l
total 8
lrwxr-xr-x  1 danrashid  staff   16 Jun  1 15:15 default -> ../default/blue/
drwxr-xr-x  6 danrashid  staff  204 Jun  1 15:19 gaslogsforsale
drwxr-xr-x  5 danrashid  staff  170 Jun  1 15:19 mybbqshop
drwxr-xr-x  8 danrashid  staff  272 Jun  1 15:19 overrides
drwxr-xr-x  5 danrashid  staff  170 Jun  1 15:19 seriousgrills
dan:plentio danrashid$ cat overrides/css/boxes.css 
@charset "UTF-8";
/* CSS Document */

@import url("../../default/css/boxes.css");

/* Your server-wide CSS overrides... */

dan:plentio danrashid$ pwd
/Users/danrashid/Sites/plentio/app/design/frontend/plentio
dan:plentio danrashid$ ls -l
total 8
lrwxr-xr-x  1 danrashid  staff   19 Jun  1 15:14 default -> ../default/default/
drwxr-xr-x  5 danrashid  staff  170 Jun  1 17:09 gaslogsforsale
drwxr-xr-x  5 danrashid  staff  170 Jun  1 17:09 mybbqshop
drwxr-xr-x  6 danrashid  staff  204 Jun  1 15:18 overrides
drwxr-xr-x  5 danrashid  staff  170 Jun  1 15:18 seriousgrills


This is how I used a symbolic link to avoid maintaining 747 template files and folders per site in Magento. FollowSymLinks must be enabled. overrides/ contains server-wide customizations. Non-customized files are inherited from ../default/default/ and will be upgraded automatically. This way you don’t have to copy and maintain the entire package, then hunt down customizations during each upgrade.

dan:plentio danrashid$ pwd
/Users/danrashid/Sites/plentio/app/design/frontend/plentio
dan:plentio danrashid$ ls -l
total 8
lrwxr-xr-x  1 danrashid  staff   19 Jun  1 15:14 default -> ../default/default/
drwxr-xr-x  5 danrashid  staff  170 Jun  1 17:09 gaslogsforsale
drwxr-xr-x  5 danrashid  staff  170 Jun  1 17:09 mybbqshop
drwxr-xr-x  6 danrashid  staff  204 Jun  1 15:18 overrides
drwxr-xr-x  5 danrashid  staff  170 Jun  1 15:18 seriousgrills
This is how I used a symbolic link to avoid maintaining 747 template files and folders per site in Magento. FollowSymLinks must be enabled. overrides/ contains server-wide customizations. Non-customized files are inherited from ../default/default/ and will be upgraded automatically. This way you don’t have to copy and maintain the entire package, then hunt down customizations during each upgrade.

Where to go from here

Ever since I stopped freelancing full-time, I’ve been indecisive about the future of this site. A year ago it was easy: I need to promote myself, now, or I won’t have income. But these days, the only people visiting are friends and family. They just want to know how I’m doing.

I’m not concerned with impressing anyone with pages like “beliefs” and “experience” anymore. And I’ve always thought resumés belong on emails, not public sites. On the other hand, it can’t be too personal. This is the first site to appear if someone Googles my name. Despite Tumblr’s conventions, I don’t even want to put up a photo.

So for now we’ll just stick to maintenance mode: a few samples if someone wants to see them, and a few not-too-personal personal updates if there’s a story worth telling. Minor, daily nonsense will remain on Twitter.

On the technical side, I can’t wait for blog software and lightweight CMSs to die. I moved off of WordPress, again, because I just don’t feel like putting in the effort to maintain blog software. That’s the major disadvantage of installing yourself.

What kept me on WordPress were the 2 main advantages: customization and backup.

We saw how much time I’ve been willing to put into customization. Still, all the functionality I want is here, and I can edit the CSS. The time I spent creating a semantic theme for WordPress went wasted. Tumblr’s are already semantic.

Backups I do manually for the 1% of information on here is that important and not already saved. Or I could just write a cURL script and run it on the archives page. But somehow I doubt Tumblr is any more likely to crash than DreamHost.

There is no reason that in 2009 basic web publishing in should still require a domain name contract, a hosting contract, and installing, configuring and maintaining software — certainly not via FTP. Services are free. Basic hosting is nearly free. Uptime is a wash. There’s no reason for it.

Dress shoes in a paper bag

Regardless of what you think of my samples, they look like hell in this template. The strategy of quickly posting something ugly is working too well. I have got to skin this thing before adding any more content. For the new theme, I want to push semantic CSS, instead of jumping straight into additional PHP. Unfortunately, the sandbox theme is full of database queries that were added just to assign CSS classes. Why not avoid the overhead and parse CSS classes from friendly URLs? Which brings us to…

The WordPress Tip of Some Arbitrary Unit of Time

Under Permalink Settings, set Custom Structure to /%category%/%year%/%monthnum%/%postname%/. Explode $_SERVER['REQUEST_URI'] to get semantic class names and apply them to <body>. Since CSS class names can’t start with numbers, you’ll have to prepend some letter(s) to the date components. Works great on WordPress 2.7.1. mod_rewrite is required. If you don’t have mod_rewrite, try DreamHost. If you also respect yourself, try NEXCESS. Time for bed.