Bradley Wright

Apr 17

killorn:

Here is a picture of legendary comic book writer Stan Lee at the exact moment he regretted ever picking up a pen in the first place. 

killorn:

Here is a picture of legendary comic book writer Stan Lee at the exact moment he regretted ever picking up a pen in the first place. 

Apr 16

Sharing files with virtual machines using NFS

In a previous post, I sang the virtues of VMWare Fusion’s shared folders feature, and the way it lets one share files from the host OS to the guest OS.

Folder sharing is a bit of a pain to install, especially because OS upgrades on the guest seem to break the guest tools installation. The solution is one of the oldest file sharing technologies there is: NFS. It’s easy to set up, works on basically everything, and is solid as a rock. It also supports symlinks, which means you can sidestep VirtualBox’s issues with shared folders and symlinks.

The best bit is that once it’s set up and works you can switch between any virtualisation technology you like (for example: I’m now using VirtualBox at work so we can make better future use of Vagrant, but I use VMWare for Windows)—this works at the OS level so it’ll just keep working.

Configuration time

This is the easy bit. First we export whichever folder we want to share from the host OS. In my case it’s ~/Projects. Edit /etc/exports as sudo (this won’t exist by default on OS X), and add the following line to it:

/Users/bradleyw/Projects -mapall=501:20 -network 192.168.56.0 -mask 255.255.255.0

The first part is obviously the directory you want to share, and the -network flag tells us which IP range to share with. In my case my VM listens on 192.168.56.101, hence 192.168.56.0. The rest of the flags you can ignore.

Now we need to run a few commands in the OS X terminal to complete this side of the configuration:

sudo nfsd checkexports
showmount -e

If everything went well no errors should be reported and your exported directory should be printed to stdout.

Now on the guest OS, you first need to install the NFS software. On Debian and Ubuntu this is:

sudo apt-get install nfs-common

If you’re on another distribution this is an exercise for the reader.

We can now configure fstab so mount knows what to do. As a super user, edit /etc/fstab, and add the following line at the bottom:

192.168.56.1:/Users/bradleyw/Projects /mnt/nfs nfs soft,intr,rsize=8192,wsize=8192 0 0

The important bits to change are 192.168.56.1, which should be the IP your guest can see your host at (so the IP address your virtual machine uses to hit OS X), the path to your export, and the /mnt/nfs, which can be anything you want. I use /mnt/nfs as it seemed the right thing to do.

Note that you need to create /mnt/nfs before proceeding: sudo mkdir -p /mnt/nfs.

Now we can attempt to mount the shared filesystem: sudo mount /mnt/nfs. If no errors are reported, it’s all good!

You should now be able to read and write from /mnt/nfs.

My own workflow

My own workflow with this is to have a case-insensitive disc image that’s password protected automount on login (this is exported as /Volumes/Smarkets). Then the Linux machine starts in headless mode, and because of NFS it’s already mounted. So I’m up and running very quickly after logging in, and the case-insensitive disc image gets around all the issues Python has when exporting from OS X to case-sensitive file systems.

Hunter helped me a lot with some of the details here.

Apr 07

git whatchanged -

Good tip this. Also, documentation on git whatchanged.

Mar 22

Now paying for GitHub

As I indicated much earlier, I stopped paying for GitHub because I have the server and know-how to host my own repos.

However, my general policy is that I’m always happy to pay a small fee to services I don’t use in a way I should to justify their value, but merely to reward them for doing good work.

So that brings me to the point of my post: with GitHub’s new image view modes, they’re doing amazing things for version control and collaboration, and I wanted to support that. So I’m now a paid up member of GitHub again.

Keep up the good work!

Mar 21

Posterous’s idea of customer service, and where I differ

I’ve been dabbling with Posterous as a potential way of mitigating Tumblr’s recent downtime issues.

The tl;dr version is that I didn’t like their service, and suggest some improvements.

My experience with Posterous

After importing my Tumblr blog into their system (which was all very smooth), I tried to edit a post and remove it, using one of their combo buttons:

Combo button

Unfortunately, in both Safari and Chrome (so WebKit, basically), their Javascript is broken. It fails, and then fails to clobber the event propagation, so the page reloads (as obviously, not being progressively enhanced, all their links are empty).

A cursory look in my console shows really basic errors like:

Uncaught TypeError: Cannot call method 'addClassName' of null

or:

Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function

Now, being the responsible developer I am, I write into them with a bug report (this is on January 29, almost 2 months ago):

Every time I click the “Edit | [down arrow]” button (the down arrow specifically), the page goes to a blank page. I assume this is because the JS is broken so you’re not cancelling the click event on the link. I’m using Safari 5.0.3 on Snow Leopard.

Not the most gracious email, I’m sure we can all agree, but then again this also seems like the kind of basic error that shouldn’t happen in the first place.

Yesterday, on March 20th (almost 2 months after submitting the error report), I get the following response from Posterous:

Hello Brad,

Should you still be experience the issue you emailed us about, try clearing safari’s cache and cookies and trying again, or using another browser.

Sorry for the delayed response,

Theodore

I mean, what? This is a fundamentally broken part of the site, and the best they can tell is is:

And I waited two months for that? As a professional developer it’s my educated opinion that the errors I describe above are easy to notice and probably easy to fix. And they can’t even be bothered checking them.

No thanks Posterous, I’ll be sticking where I am for now.

What I would have done

At Smarkets customer service is a part of our business that we take very seriously. I would have responded roughly as follows:

At a startup, every customer is valuable and should be treated like they’re important and that their opinion matters. These are trivial things to get right, and prevent long-winded disgruntled blog posts like this.

Nov 17

czottmann:

Astronaut Tracy Caldwell Dyson enjoying the view: APOD: 2010 November 15 - Home from Above

It’s like something from a sci-fi movie. Absolutely amazing.

czottmann:

Astronaut Tracy Caldwell Dyson enjoying the view: APOD: 2010 November 15 - Home from Above

It’s like something from a sci-fi movie. Absolutely amazing.

Oct 25

Generating an SSL certificate for testing -

As pointed out to me by Russ. He also points out that step 3 can be skipped completely by using -nodes instead of -des3 in step 1.

Oct 18

Issues mounting shared folders in VMWare Fusion 3

I recently took advantage of the VMWare 3 upgrade for only $9.99 USD, which has all gone well, except for one issue with /etc/fstab: it turns out that VMWare Fusion 3 tools doesn’t actually respect your mount settings, which means you lose all the permissions information contained therein.

There’s a solution to the mount problem here, which works perfectly after a reboot. I hope VMWare fixes this soon, though: it’s a pretty nasty bug.

Sep 17

“(W)hy fight the biggest revolution in information flow since the printing press when you could easily work with it by adding services that actually add some value beyond the free act of making a digital copy?” — From Minecraft creator notch on how piracy works, and how to go with the Internet rather than against it.

Sep 04

Follow up to previous UX and Ryan Carson post

My previous post seems to have gotten the attention of Ryan himself. As Ryan mentions, I’m on Tumblr, which means no comments.

I invite Ryan to email me at brad at this domain with his comments (I also did on Twitter, but last time I checked he had blocked me) and I will publish them.

I’d also like to note that at the time of writing he has additionally blocked Tom Muller and Ben Darlow on Think Vitamin, so I wonder if he’s genuinely interested in dialogue at all.

See below for what I currently see when visiting Ryan’s most recent Tweet (or should I say “dialogue”?):

Blocked!