Posts Categorized: linux

SVG to online coloring-sheet SWF

You can do quite a bit of unorthodox stuff with PHP.  If you head over to epbsoft.com, you’ll find several flash coloring sheets I made with PHP, not Flash.  (Sort of anyway.)  I make them by first creating specially formatted SVG (Scalable Vector Graphics) files and feeding them to a PHP script that writes ActionScript files that are then compiled by MotionTwin ActionScript compiler.  As far as capabilities, it’s not all that capable.  I have to jump through a couple of hoops to make an SVG that my ActionScript generator can actually parse properly, but when it works, I like the results.

svg-to-coloring.php.zip <– The source code is available if you want to take a look at how it works.

MongoDB looks Interesting

I might take a look at installing MongoDB on my server.  I like the idea of a document-driven, NoSQL database, especially after working with relational SQL databases for years, and MongoDB looks interesting.  You can read more about it in Developing scalable PHP Applications using Mongo DB. What caught my interest is how flexible using it appears to be from the linked article.  Plus, using something other than a SQL database could be a nice change of pace.  I HATE adding fields to a SQL database table, and it looks nearly painless in these examples.

Another thing that seemed as though it were worth looking into is it’s apparently designed with storing whole files in mind.  I’ve stored files in MySQL databases before, but MySQL really isn’t designed with that in mind, but at the same time, if I’m going to be making a lot of small binary files, I don’t like them cluttering up my directories.

Mounting a VHD in Linux

The vdfuse instructions have been updated, please view the more up to date instructions for vdfuse here: Mount a VHD or VDI in Linux with vdfuse.

Let’s say you have a VHD file you’d like to access while in Linux without attaching it to a Virtual Machine.  There are many reasons you might like to do this, but it’s not immediately obvious how to do so with Linux.

There are two ways I know of:

You can use vmware-mount provided by VMWare Server.  I don’t actually like this method because VMWare Server is huge and I don’t use VMWare.  However, if you do, take a gander at this: http://www.vmware.com/support/reference/linux/loopback_linux.html

The method I ultimately went with was vdfuse since I use VirtualBox.  It allows you to mount any disk image supported by VirtualBox.  Basically, if you follow the instructions at that the vdfuse forum link I just provided, you can mount the VHD to a mount point in your filesystem.  Now, this alone doesn’t yet give you access to your files yet.  It provides the partitions as standard files (and a file for the entire disk as well).  The partitions are named Partition1, Partition2, etc.  You can then mount the partition you want as a loopback device.