kdmurray.blog

The crossroads of life and tech

Ubuntu School – Get Rolling with Webmin on Ubuntu Server 11.10

Even if some Linux purists would have you believe the command-line is the only way to go, the pragmatist in me will always take an appropriate GUI over a complicated command-line any day. You can run a lot of powerful services for your home network using one or more Ubuntu server machines. With the right tools you don’t need to be a Linux expert to make that happen.

The tool of choice is Webmin. This is a set of web-based tools which allow you to control virtually every piece of server-side software on you Ubuntu server. The GUI is intuitive and straight-forward, the documentation is excellent, and the project is under active development.

Because Webmin isn’t in the standard repositories you will have to do a couple of quick command-line changes to configure your system to be able to find and download the apt package.

sudo nano /etc/apt/sources.list

Once the file is open, add these lines to the bottom of the file

#########################

Package Sources for Webmin

deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Those lines will add the necessary sources to apt for it to find the Webmin package. The Webmin package has also been digitally signed by its author. By default you will need to download the author’s key so that apt can use it to verify the Webmin package at install time. Fortunately, this is really easy to do.

wget http://webmin.com/jcameron-key.asc sudo apt-key add jcameron-key.asc

Now that all the prep work is done, it’s time to install Webmin.

sudo apt-get update sudo apt-get install webmin

All done! Now you can access administrative functions of your server’s services from the Webmin console: https://yourservername:10000/. This URL is also shown in the last few lines of the apt install details that are ouput to the command-line.

C# IsNumeric implementation

Here’s a quick and dirty implementation of “IsNumeric” in C#. This is one of those methods that just seems to be missing from C# which appears in so many other languages.

UPDATE 12-Apr-2011: After some fantastic discussion elsewhere I’ve modified the code to handle a number of additional scenarios. A point was also raised that a combination of Int64.TryParse() and Decimal.TryParse() would accomplish the same thing. They would, almost, but those methods test for valid 64-bit integers and valid 64-bit decimals — they don’t test whether a string is numeric. Feed them a long enough string of numbers and they’ll return false. It’s a pretty fine distinction, I grant that, but I figured since I was writing the code I might as well make it as robust as possible.

        public static bool IsNumeric(string s)
        {
            return IsNumeric(s, false);
        }

        public static bool IsNumeric(string s, bool allowDecimal)
        {
            bool result = true;
            if (String.IsNullOrEmpty(s))
            {
                return false;
            }

            if (s.StartsWith("-"))
            {
                s = s.Substring(1);
            }

            char[] chars = s.ToCharArray();

            if (allowDecimal)
            {
                bool decimalFound = false;
                foreach (char c in chars)
                {
                    if (c == '.' && !decimalFound)
                    {
                        decimalFound = true;
                    }
                    else
                    {
                        result = result & (char.IsNumber(c));
                    }
                }
            }
            else
            {
                foreach (char c in chars)
                {
                    result = result & char.IsNumber(c);
                }
            }

            return result;
        }

I built 14 39 unit tests for this on the project I built it for throwing all sorts of weird and null data at it, and it seems to run fairly well and reasonably quickly. Any comments/suggestions are welcome.

Top 4 iPod Touch Applications that I’ve Paid For

Over the past decade or so I’ve become a strong believer in paying for media that I consume — not surprisingly this coincides with my ability to afford to buy stuff.  In the spirit of promoting the concept of paying back those who provide us with great software, I give you my Top 4 iPod Touch Applications that I’ve actually purchased.

1Password

1Password is a password manager for MacOS X which late last year released a version of their application which works with the iPhone and iPod touch.  Both the desktop and handheld versions of the application are brilliant and provide a great credential management service for those running the appropriate devices.  If you’re a slider like many of us are starting to become, it may not be the solution for you since there’s no version of 1Password available for Windows or any flavour of Linux.

Website | App store | Twitter

Crayon Physics

Again coming from desktop-based roots Crayon Physics is a simplistic looking game for the iPod Touch.  The goal is simple, draw the tools you need to get the ball to the goal.  The trick is you need to be able to anticipate how those tools will react to gravity, friction and impacts with other objects.  Give Crayon Physics a try if you want a game that’s challenging enough to make you think, but easy enough to actually complete.

Note: the desktop version was licensed by Kloonigames to Hudson Soft, so they’re technically not related.

Website | App store

iShoot

iShoot is a great replication of games that were super-popular in the early 1990s like Worms and my favourite Scorched Earth.  Battle it out with the computer or up to three other human players in a tank-on-tank-on-tank-on-tank battle with weird and wonderful weapons of all kinds.  A recent release of the game also includes the ability to define your own rules, terrains and weapons making it a truly personalized experience.

Website | App store | Twitter

SpaceTrader

Modelled after games with the same name on other platforms, and of course loosely based on Wing Commander: Privateer, SpaceTrader allows you to fly from planet to planet as a trader in an effort to make as much money as possible.  This game is the only 3D entry on the list with a fairly rich 3D environment that you can walk around and explore.  I had some memory issues with this game early on, but working with the developer and sending in some crash logs a newer release seems to have licked that problem.  Give this a try as a neat alternative to the 2D side scrollers.

Website | App store

Which applications have you purchased?  Or are you more of a JailBreak type?  Party in the comments…

WordPress Plugin Search Finally Works!

WordPress LogoI did not get a chance to blog this when it first came out, but I’ve just used it again and I cannot possibly let it pass without note. WordPress has drastically improved the plugin search. They announced the upgrade a few weeks ago on the WordPress development blog.

I’ve been hard on the poor WordPress guys in the past, so I feel a special obligation to acknowledge the improvement. The search now does a great job of indexing titles, descriptions and keywords to help plugins show up quickly and easily.

Best of all for me, a search for “random image” puts the Random Image selector plugin at the top of the list (at the time of this writing at least).

Thanks WordPress guys!!

How To Slipstream Windows XP SP3

I’ve decided to go with Windows XP for my dual-boot environment on the MacBook.  Partly due to familiarity, but mostly due to the lower resource requirement.

In setting up this new environment, I needed to decide how to cope with my Windows XP disc being an original, pre SP1 disc.  The solution: Slipstream.

Slipstreaming allows you to create a Windows XP CD that has updates like the most current Service Packs.  In this case, I’ll be adding Service Pack 3.

There are lots of guides on how to do the Slipstream process, including these two on HowToHeaven and Invisibill.  These are great step-by-step tutorials that show you everything involved in the process.  But they’re also very manual.

The tool I’ve chosen to go with is nLite.  This slick little application provides the ability to not only Service Pack your XP installation, but apply lots of other custom features as well.  Here are the steps I went through for my Slipstreaming adventure.  (There is also a step-by-step guide on the nLite Website)

Installation Screen ShotStep 1: When running nLite is to show it where the Windows installation is located.  After that, you’ll need to specify a location for nLite to perform it’s magic.  I chose C:slipstream.

Windows Slipstream ScreenshotStep 2: The next phase is to select the options for your installation.  I’m a whole-hog kinda guy, so I elected to go with every option if for no other reason than to browse the options and screens.

Windows Slipstream Screenshot

Step 3: Pick your Service Pack.  Once you’ve selected a service pack and applied it, nLite will perform the Slipstream operation and integrate the service pack.

Windows Slipstream ScreenshotStep 4: Updates & Hotfixes.  The more that you can download and apply here, the fewer there will be to apply once the windows installation is completed.

Windows Slipstream ScreenshotStep 5: Select components to remove.  nLite gives you the opportunity to eliminate components from the final installation.  This can lighten not only the ISO, but also the final installation.  Beware removing too many options.  By eliminating support for hardware or drivers the usage of the installation will become more limited.  However, if you have a specific application in mind it can help to streamline the process.

Step 6: Unattended Install. The next screen provides the ability to streamline the installation for a smooth unattended install.  If you want to use this option, you’ll need your Windows XP CD key at this stage.

Step 7: Installer Options. This screen allows you to customize some of the behaviours of the installation process including boot-time messages and BIOS backup retention.  If you don’t understand an option, take the default.

Windows Slipstream ScreenshotStep 8: Tweaks. Wow.  This section has dozens upon dozens of options to tweak and adjust virtually every major setting in Windows.  And a whole bunch that aren’t so major.  Take your time with this and make sure to read the little captions for each option.  There are so many possibilities.

Step 9: Integrate all the changes.  nLite will begin to create the installation image, merging together all the changes you’ve selected.  This process will take quite a while.  On my machine it took about 10 minutes.

Windows Slipstream ScreenshotStep 10: Burn the ISO.  Set any last settings you want for the ISO, and click the Create ISO button to start writing the image.  Once the image is written, it can be installed to a VM (VMWare/VirtualServer) or burned to a disk for installation at a later time.

iPhone 3G Jailbroken — Ha!

Well that didn’t take long.

In a short post titled “Thanks for waiting :) ” released yesterday, the iPhone Dev Team released Pwnage 2.0 for jailbreaking iPhones running the iPhone firmware version 2.0.

It should be noted that this doesn’t unlock your iPhone, it only opens up all the things that the old Jailbreak used to do.  With the advent of the app store, this is now more of a “hardcore” change than ever before… but nonetheless, Kudos to the iPhone Dev team!

Update #1: I also meant to note that un the first day since this was released, the blog entry received over 2800 comments.  Thats one way to get traffic.  :P

Virus Hunting — Avast + Unlocker

After a somewhat brief Aikido class tonight I was enlisted by Crow to help rid a Vista machine of the Vundo trojan which found it’s way onto the machine (prior to Avast being installed).

Avast did a great job of finding most things and cleaning them up.  What it had trouble with was a few DLLs that were in use by the executing trojan.  I was pointed toward Unlocker to free the DLL’s of their executing process and remove the lock that windows places on these files.  Once the file was unlocked, it was able to be deleted by Avast and all was well.

(Photo Credit: bigux on Flickr)

Picasa for OS X in 2008

It’s been a busy week this week, and there’s some news items that I just didn’t get to yet.  This one comes to us courtesey of TechCrunch.

One of the most popular photo editing programs for Windows has to be Google’s Picasa.  Though it’s not the most full-featured image editing on the market it’s free and great for managing photos and albums, something that isn’t a strength of more full-featured applications like Photoshop and Paint.NET.

On the Mac, the most obvious photo organizer is Apple’s own iPhoto.  iPhoto does a decent job of organizing photos, though it does have its drawbacks and it’s not free.

A free Picasa would not only challenge iPhoto, but would also channel users into using Google’s online service Picasa Web Albums.  One question raised is how this will affect competing photo management services like Photobucket and industry leader Flickr.  Reality is it will probably do little to the market since OS X users make up a relatively small percentage of the software market, but what it will do is make Picasa a true cross-platform tool.

Ultimate Google Analytics Plugin for WordPress

I’ve always been a bit of a stats monkey when it comes to… well pretty much everything.  I like to know how many there are, how long it takes, how much it costs.  I want the numbers.  But more than that, I want accurate numbers and often times in the past trying to get accurate numbers for website traffic has been a real challenge.  Google Analytics does a great job of  tracking every hit to my blog, but unfortunately it tracks mine too.  This conundrum led me to the Ultimate Google Analytics Plugin.

This plugin does a great number of things and has an options screen as long as my arm.  Aside from having the ability to ignore administrators, it also has the ability to add in tracking to all of your outgoing links and downloads.

If you use WordPress and you use Google Analytics you need this plugin.

Mac Lab Rat – GGP #74: I Need Help with My Frash

Hey everyone!

I was able to meet up with the geeks to join them for the recording of the 74th edition of the GGP. We covered a ton of stuff in this week’s show, and as promised here’s the details for this week’s Mac Lab Update.

Net News Wire This was huge news this week. With NewsGator releasing all of it’s personal products as free downloads (FeedDemon, NetNewsWire and a few others) they have taken a huge step towards monopolizing the RSS agregation client market. As regular listeners of the GGP already know, Dave is a bit of an RSS afficianado and he highly recommended I check out this app as soon as it became available.

So on Thursday I downloaded and installed it, and gave it a run through it’s paces. Though it caused me a few headaches as it imported the sixty or so feeds that I had in my Google Reader OPML file, over the next few hours it became less finicky and seems to be working as advertised now.

Using a client instead of a web interface is often a more visually rewarding experience, and NNW doesn’t disappoint in this department. The UI is clean and easy to use, and there are enough options available to make organizing and browsing the articles in your feed a breeze.

Net News Wire is (now) a free application.

MAMP This item came to us from GGP listener Eric Searle. MAMP (Macintosh, Apache, MySQL & PHP) is the OS X implementation of the classic open-source development stack LAMP (Linux).

MAMP is a one-stop shop that brings the Mac usability experience to open-source development. Though it’s possible to install and configure all of these components from source code as is done on other systems, the MAMP package provides a quick and easy way to get a PHP development environment running on your Mac.

The open-source MAMP stack, are free applications.

gDisk gDisk is an OS X utility that gives you the ability to mount a drive to your system that will save files to your GMail account. This is a great way to move relatively small files between different computers or locations, with a backup copy stored in your GMail account.

It’s a simple utility that does exactly what it claims.

gDisk is a free application.