kdmurray.blog

The crossroads of life and tech

SimCity Source Code Released Under GPL

Bil Simser has posted an article on his blog about the release of the source code for the original SimCity under the GPL. The GPL’d version has been renamed under the original working title Micropolis to protect the trademarks of Electronic Arts who currently own the intellectual property for the Sim* franchise. If the original title had stuck I wonder what they’d call The Sims these days….

The source code for Micropolis has been published on author Don Hopkins’ website. He has also included a bit of history about this branch of the SimCity project including some technical detail behind this iteration of the code.  The GPL version has also been ported to the version of Fedora Linux being run on the OLPC.  A great way to spread this brilliant game to those who are just getting a computer for the first time.

I love the fact that older software continues to be released to the public domain. I’d love to find a copy of Wing Commander… If there’s anyone out there from Origin (or EA) can we see a GPL’d version of WC1 so that we can play it on our Macs!!

Random Image Selector 1.2.0 Released

I’ve just put the finishing touches on the latest version of the Random Image Plugin that I originally released in the summer.  This plugin will allow you to produce an <IMG> tag containing a randomly selected image from a folder of your choice on any wordpress page (or post if you allow php).

The two biggest features in this version are:

  1. Automatic discovery of your WordPress Folder:  One of the biggest barriers to entry for the non-technical folks who tried to use this plugin was a lack of knowledge (or access) for finding the physical path to the WordPress installation.   The plugin will now automatically detect and use this path. CAVEAT: If you currently point your plugin at a folder which is outside of your wordpress installation, you will need to move that folder to use the v1.2.0+ versions of the plugin.
  2. Scaling/Sizing of the Displayed Images: One of the most requested features from the first iteration of the plugin was the ability to resize or scale images to fit in a particular location.  With older versions, if you wanted all the images to display at the same size or proportions then you needed to resize them all prior to uploading.  Well this is no more!  Now you can upload tons of randomly-sized images and the plugin will take care of the dirty work (including the calculation of just how much to scale-to-fit.  :)

I’d like to take the opportunity to thank everyone who has downloaded the plugin, and particularly those who have taken the extra time to send me feedback.  As of this release the plugin has been downloaded over 2,400 times which far exceeds anything I thought I would accomplish.

So give this plugin a shot, and let me know if it works out for you!

Project “Gutsy Gibbon” — Adventures with Ubuntu

I’ve been running a Linux machine at the house for some time now, experimenting with trying to use it for a central file server where I can get at things like music and pictures from any of the computers in the house, and in some cases from over the Internet.

I’ve tried using various incarnations of Red Hat including the Fedora Core (5 & 6) series, but eventually I hit some kind of a wall and give up. After all the technology is supposed to be there to serve me, not the other way around.

'A Grid' Photo Credit: IO_Burn on Flickr

Last week I listened to the second episode of the Knightcast. This was the continuation of the series “the Grid”. The main focus of the episode was getting started using Ubuntu as a “power-station” in a home or (very small) business network.

I listen to most of my podcasts in the car, so the first time I listened to this episode, I was driving around the city on my daily commute and it gave me lots of time to think about just how useful this type of “home server” might be. When I got home, I pulled the podcast up and went through the first part of it again, the bit that explains some of how the server could be put to good use. Most of it is pretty common sense stuff. The “power-station” server machine allows for a central place in your home where documents, media and other files can be stored and it provides a mechanism for making that data remotely accessible.

Knightwise also discussed a couple of options for remote administration, which is always a good thing. I’d much rather be able to addess and deal with my server by way of my MacBook from the deck (or the bedroom) instead of tromping all the way downstairs where the (very noisy) desktop machines have been relegated.

Almost immediately a few new possibilities began rolling to mind…

For some of the software development that I do, it would be very handy to have access to a SubVersion repository that I could use to manage the code from anywhere on the Internet. Oh sure, there are other services like SourceForge and GoogleCode which offer similar services, but it never hurts to be able to have full control over your machine, and your information.

With a built-in server, adding FTP (or better yet SFTP) capability makes it that much easier to share specific files or data with friends and colleagues. Again you could sign up for a service like X-Drive or Box.net for this, but why not take advantage of owning all your own data. If done correctly, the self-hosted model can be much more secure.

Add to this the fact that my router, by way of it’s spanky new DD-WRT firmware, supports several free DDNS services, and I have a new server set up to serve my content on the web or anywhere else. And I don’t even have to remember my IP address (which admittedly hasn’t changed in the over 2 years I’ve had my service… thank you Mr. ISP!)

It sounds like there are going to be some more great tips coming up in future Knightcast episodes featuring “the Grid”. I wonder what else my 6-year old P4 desktop will be able to do for me!

Take it with you — Portable Apps

I realize that for some of you, this story isn’t exactly news.  To be honest, even I’ve known about PortableApps for quite a while, but I’ve never put it to use until recently.

PortableApps is a series of applications which have been built and configured for the sole purpose of running from an external device such as a flash drive, memory card or external hard drive.  This allows you to port not only your data from PC to PC, but your applications as well.  You can keep your email client (Thunderbird), web browser (Firefox) and many other tools and applications on the USB key and run them on any computer with Windows and a USB port.

How is this useful you may ask?  A recent example:

I have been doing some presentations at work last week we had a laptop whose Powerpoint application refused to open (read: Runtime error every time it started).  Admittedly a reboot probably would have fixed the probem, but I couldn’t take that chance.  I had to get another laptop, (wait for Windows to boot), and get it all set up.  This wasted about 15 minutes of everyone’s time.

A perfect solution to this would have been to use the OpenOffice slideshow application Impress and run the entire thing from my USB drive where the presentation was stored.  So over the past couple of days, I’ve been trying out my new setup (Firefox, KeePass and OpenOffice) in the office to see how it runs on various other computers.  So far, so good.

Have a look at the PortableApps suite.  There are tons of great applications for this technology, and I’ll probably cover some more examples in the coming weeks.

Microsoft to Release .NET Framework Source Code

Microsoft .NET FrameworkI’ve covered a few stories on this blog [1], [2], [3] where Microsoft is making some positive strides toward opening up to the concept of open source, particularly in relation to it’s software development arm.

On October 3rd Scott Guthrie, manager of the teams who build the development and platform tools at Microsoft, announced that the source code for the .NET Framework would be released with the next release of Visual Studio (VS 2008).  This announcement is the latest in a series of moves by Microsoft over the past couple of years.

Though the source code will be available for download and reference by software developers, it will be licensed under the Microsoft Reference License, meaning that the source will not be freely distributable.

Still, this is a major step forward for the software giant, and I’m looking forward to seeing what the next step will be on the journey toward peaceful coexistence with the open source community.

WordPress 2.3 Released — Changes Iminent

WordPress 2.3 was released today.  I’ve been looking through the specs, and the upgrade sheets to see what the major new features are.  I expect to apply the new update in the next week or so.  I’m working on a new upgrade script that will use the wordpress subversion repository for the source, instead of pulling the zip file.

Stay tuned for that, as well as updates to the two wordpress plugins [image, admin] due in the coming weeks once they’ve been verified and known to work with WordPress 2.3.

Random Image Plugin — 1000 Downloads!

Exactly 2 months ago, I released my Random Image Selector plugin for wordpress.  Every now and again I take a look and see how many people are downloading the random image plugin.

On average, in the exactly 2 months since it’s release about 15 people are downloading the plugin.  And on September 22nd, it hit the 1000 download mark!

Thank you to all who have provided feedback on the plugin, and suggestions for the next version.  I am working on it now and expect to have something released by mid-October once all the WordPress 2.3 testing is completed.

Thanks again, and happy downloading!

Website Redirect with mod_rewrite

Warning: This post is going to get a bit technical…

This afternoon, I was checking out my Google Analytics statistics and realized that I was still getting quite a bit of traffic to the old blog at krell.cellsandbytes.net. I was wishing that these people would be kind enough to click on my new links on the new blog… but alas this was not the case.

So I set about trying to figure out how to make all of my old blog pages redirect to the ones on the new site. For your convenience, I’ve documented the steps involved in case you need to do this too!

  1. Make sure that the permalink structure on the two blogs matches (otherwise things get messy)
  2. Make sure you have access to edit the .htaccess file in your website’s directory
  3. Add the following code to the .htaccess file (most likely at the top): RewriteCond %{query_string} ^(.*)$ RewriteRule ^(.*)$ http://kdmurray.net/$1?%1 [R=301,L]My .htaccess file in my WordPress installation now looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule . /index.php [L]RewriteCond %{query_string} ^(.*)$ RewriteRule ^(.*)$ http://kdmurray.net/$1?%1 [R=301,L] </IfModule> # END WordPress I had to comment out the line #RewriteRule . /index.php [L] to make the vanity URLs function correctly.
  4. Test your website

I was able to make this work for static pages (/index.php) as well as the vanity URLs (/2007/06/15/flickr-vs-photoblog/) and everything seems to be working swimmingly. This will successfully re-route all the traffic from links, or bookmarks to my old site, and ensure people land on the right page on the new site.

Credit: Thanks to jdMorgan a moderator at webmasterworld.com for the original rules & regex.

WordPress Plugin: Admin Links Widget

I’ve just launched the first version of a new WordPress widget, the Admin Links Widget.

This very simple widget does as the name suggests. It provides links to administrative functions from the sidebar of your WordPress installation. The catch is, only administrators will be able to see the links so the general public won’t have their view cluttered up with links they can’t use.

Give it a try!

  1. Download the Plugin
  2. Unzip into your WordPress plugins folder
  3. Activate the plugin
  4. Add the widget to your site!

If you have any suggestions or feedback, please feel free to post below.

WordPress Plugin: Random Image Selector

UPDATE: December 9, 2007: The Random Image Plugin has been updated! Please see the new post for updates on features, or to comment.

 

 

Have you ever wanted to display a random image from a folder on your site? Maybe for a background or banner for your blog? Now there’s a quick and easy way to do it: the Random Image Selector plugin for wordpress!

The initial release, version 1.0.2 is available from the WordPress.org plugins site. The download location is http://wordpress.org/extend/plugins/random-image-selector/

The premise of the plugin is quite simple, create a folder on your website where you want to store your randomly selected files. The plugin will select from all the files in that folder, and choose one at random to display. This is a great way to create a random, rotating header for your blog, or even GASP a primitive ad-rotator.

  1. Extract randomImage.php into your wp-content/plugins folder (or a subfolder)
  2. Activate the plugin in WordPress
  3. On the options screen, select the “Random Image” menu
  4. Fill in the values for your physical and http paths
  5. Add some code to whatever page you want to display the image. This is a great way to customize the header image for your wordpress installation. The plugin will look in the folder and randomly select a header image to display.

Sample Code: <?php if (function_exists('generateRandomImgTag')) { generateRandomImgTag(); } ?>

I welcome any comments, feedback or suggestions for future iterations. I’ve got a few ideas myself. I would like to thank Stefan, one of the early adopters, for his feedback and corrections for the documentation. For another look at the plugin in action visit his site stefanmedia.