This is an update to a post from a few years ago on playing Dark Castle in Windows. I had the urge to play Dark Castle last week, but I needed to update the archive to contain the Macintosh emulator for Mac OS X as well.

Inside the archive you’ll find images for Dark Castle and Beyond Dark Castle, two of my absolute favorite games to play in the mid 80s on old Macintoshes like the Mac Plus. Follow the steps below to enjoy these games on modern OSes.

Run the Mini vMac.exe or Mini vMac.app executable, depending on your OS. Mini vMac is is a Mac Plus emulator which is freely distributed. Mini vMac requires a ROM image from a Macintosh Plus to run, which I’ve provided as well.

Once you’ve started Mini vMac, you are effectively running a Mac Plus with no operating system installed. I created a disk image with System 6 already installed. Go to File > Open Disk Image within Mini vMac and open the file Disk603.dsk or drag the file into the Mini vMac window.

Now that System 6 is up and running, we need a hard drive available to install software and save data to. Just like the previous step drag the included file, hfs10M.DSK into the vMac window to mount the 10M hard disk image I pre-loaded with the Dark Castle software.

Run the Dark Castle executable to start the game. For Beyond Dark Castle, mount the BDCImage.hfv file and run the game from there.

I’ve had this post saved as a draft for two years, so I finally decided to clean it up a little and publish it in case anyone else finds the information useful.

In web development, for both client and server testing, it’s often very useful to have a local web server running in order to serve test cases. This post outlines a few quick and easy ways to run a local web server that don’t involve installing Apache or nginx and all their dependencies.

You can then type an arbitrary response back to the browser, terminating the stream with Ctrl+C:

HTTP/1.1 200 OK
Content-Type: text/html

Hello <b>world</b>
^C

The hello world HTML page shows up in your browser as you would expect. You could just as easily use an existing file on your filesystem as input for the response:

brandon@dexter:~$ nc -l 8000 < http_response_file.txt

Another option to consider, especially if you already have test cases or other static content ready to serve, is Python’s SimpleHTTPServer class. You don’t even need to write a script to run one of these servers locally:

This time, hitting http://localhost:8000 in your browser will bring up a directory listing with your current working directory as the document root. Your requests are also logged on your Python terminal:localhost - - [16/May/2011 14:55:36] "GET / HTTP/1.1" 200 -

On a separate but related note, you can get a local SMTP testing server, which only logs to the console and doesn’t actually send mail, by running:

In other words, every layer of the Web stack, which I use every day for fun and for profit, is powered by Open Source Software. It would be beyond impossible to deploy a website today with rich, interactive experiences without these fundamental pillars. I owe so much to Linux, Open Source, and OpenStandards, and it is only right that I acknowledge this fact.

GitHub is an amazing tool which holds a lot of promise for pushing open source software development forward. I say that because they make the process of forking someone else’s repository and then merging your changes (with their permission, of course) back into the master repo as simple as a few mouse clicks. I, for example, contributed a patch that made jQuery CSP-compatible which was later pulled into the jQuery trunk.

Since GitHub has become the industry standard for sharing code, I’ve started the process of moving all of my open source tools to a repository there. So far, I have only moved my Python CIDR block converter, but the rest should follow soon!

I wrote a bookmarklet that analyzes the content on the current page and recommends a Content Security Policy based on the types of content it finds on the page and the sources of that content. The implementation also takes into account resources that are dynamically added to the page by JavaScript.

For instance, today I learned that ReCAPTCHA loads script both from api.recaptcha.net, but also from www.google.com. Note to self: figure out why Google needs to know about every ReCAPTCHA load.

You can test it out by clicking the following bookmarklet: Recommend CSP