Perl Shared Hosting on BlueHost

This blog (and several other websites that I run) are hosted on Bluehost which has been a pretty decent, fair and inexpensive hosting provider to me. They offer SSH/shell access, too, which is definitely a plus.

Recently there’s been a bit of a movement to explore Perl support on shared hosting providers like Bluehost led by the website perlsharedhosting.com. The site is a clearing house of information about hosting providers which support Perl web frameworks (like Dancer, Mojolicious, CGI::Application, Web::Simple) – and providing instructions to set up live demos.

Well, I’ve got a live demo of the Dancer and Titanium frameworks running on my account on bluehost. You can find them here:

http://byte-me.org/dancertest/dispatch.cgi/ (yes, you need the trailing slash)
http://byte-me.org/titanium/test.cgi/

It’s pretty awesome to think you can write a webapp in Perl and host it using modern Perl frameworks like Dancer and Plack on account that costs under $10 a month.

No Comments

Testing new version of Feedwordpress Duplicate Post Filter

UPDATE: I checked in a new revision of 1.3 in rev 187105. This one readds some diagnostic logging and checks the num_rows class scalar to see if any rows were returned in the DB query which is probably the Right Way To Do It(tm).

I’ve recently gotten a couple of emails from people that my Duplicate Post Filter was broken or not working properly. This came as a surprise to me because I haven’t regularly been running the site I originally created the plugin for since around January of 2009. I originally thought maybe my plugin was using deprecated calls or actions, but that’s not it at all.

When I reviewed the code for the first time in over a year, sure enough, there was a really dumb typo in the SQL query which would have caused it to return a false negative every time it was executed, meaning that every post would come back as “not a duplicate” even if it really was. And since I had the opportunity, I refactored the SQL query to more safely and better use the wpdb class methods.

I’ve updated my SVN trunk to 1.3 and I’m going to email the filter to the people who emailed error reports so they can test it. My own limited smoke testing shows that it seems to be functioning. If the other testers report back with success, I’ll tag the 1.3 release on/around Christmas as a little gift. At that point, the WordPress plugin website will do its magic and people will be able to auto-update if they like (which they will I’m sure!)

7 Comments

DIY Mac Book Pro RAM upgrade

I have an early 2007 vintage MacBook Pro. I bought it when the local CompUSA store was having its going out of business sale – got it for 5% off list which I felt was a pretty good deal considering that Macs (non-refurb ones) never go on sale.

It came with 2 GB of RAM from the factory and because Apple memory always cost an arm and a leg, I hesitated to upgrade it – besides it wasn’t broken. Since RAM has gotten so cheap, I finally decided I’d take the plunge and upgrade.

There’s even a YouTube video (go on – it’s only 2 minutes long. I’ll wait…) that shows exactly how to do it yourself.

One helpful tip that was omitted from the video, though: you need a #00 philips screwdriver to take the cover off after you remove the battery. After searching around teh Interwebs, I found this screwdriver set at Radio Shack. (Mine varies cosmetically from the picture but it’s the same price and set of bits.)

I just used it to install the new 2 GB SO-DIMM in the laptop. The tool is perfect for the job; but the case is rubbish.

No Comments

HDHomerun and Windows 7 Media Center

The HDHomerun is an ethernet based dual television tuner. It’s compatible with Linux, Mac and Windows and since I have a mixed OS household, thought it would be the way to go.

On the Silicondust forum, I’ve noticed a number of posters who reported problems in the Windows 7 release candidate. Although I’ve only had the Homerun on my network for about 4 days, so far it’s been entirely straightforward and easy to use.

It was literally:

  • Unpack box
  • Plug in cable
  • Plug in power
  • Install drivers
  • Use Media Center to scan for TV channels
  • Watch TV

Since my whole house aside from the little hub around my cable modem is wireless, the picture quality, especially on HD broadcasts can be a bit choppy when I’m “doing other stuff” on the Internet and trying to watch/record TV at the same time. But when the wireless network is quiescent, the picture quality is great.

Originally, I had dismissed the idea of a MythTV box “just” to record television, but I’m thinking now it might be a good idea.  I could record the TV shows on the Myth server, and copy the files to my Home Server, and then from the Home Server, all the PCs and Macs in my house could watch the shows. Probably not a good idea to toss this idea to the wife right now, but it’s in the back of my head. :)

No Comments

First impressions of Windows 7 RC

I’ve been running Windows 7 RC on two of my home systems for about a week now.

System 1 is a Lenovo S10 Netbook with an N270 ATOM processor, 1 GB of RAM and an 80GB disk slice. (Dual-boots OpenSolaris B111; see this post for more about that.) The netbook is where I installed Windows 7 beta back in February.

System 2 is a self-built PC with a Q8400 quad-core Intel processor, 8 GB RAM, 1TB of disk, Nvidia 8800 GTX (with the G93 GPU) and a TrendNet Wireless N USB adapter.  It was previously running Vista SP1 Ultimate x64 and was built around November 2008. (This system used to have a Linksys PCI Wireless N interface, but I had problems with it under Vista and Windows 7. It was solid under XP SP3, for whatever that’s worth.)

I did a Vista->W7 upgrade of System #2, and a clean install on System #1. The upgrade process was very smooth. I was a tiny bit frustrated by the upgrade advisor though.  It was great that it pointed out incompatible Windows 7 software (daemon-tools) that I had on Vista, but it was annoying because it only identitfied one show-stopper at a time. So everytime I corrected an issue and restarted the upgrade I felt like I was gambling on whether I’d pass the upgrade advisor check.  It would be better if the installer identified all of the potential conflicts on the same screen, so at least it’s clear that when those problems are resolved you can immediately start an upgrade.  The upgrade itself took about an hour and when it was finished I was amazed that all of my old software was seemingly automagically reinstalled.  I’ve had absolutely zero problems with the software and since Nvidia is on the ball with WQHL-certified Windows 7 video drivers, I was able to start several 3D gaming engines quickly.  The Windows Experience Index on this system was rated at 5.9 (out of a possible 7.9) the lowest performing component being the hard drive.

With the netbook, I did a clean install on that system since Microsoft clearly expressed the desire that W7 Beta installs get fresh installations instead of in-place upgrades. This time, I installed Windows 7 32 bit using a 16GB USB stick, following the directions here.  Since this was a clean install and from flash memory it took much less time than the DVD-based system #2 upgrade. After the upgrade was complete, the system tested out with a WEI score of 2.1, with the CPU being the weakest system component. I was a bit surprised the netbook scroed so low, because according to Microsoft guidelines, a system should have a minimum WEI of 3 to run Aero. The native Intel 945 graphics controller seems to do a fine job with Aero, however.  The one area where sluggishness is especially noticable on the netbook is on websites under IE8 with a lot of fancy javascript (like Yahoo Mail, for example.) That isn’t really a Windows 7 issue, per se, but more a function of IE8′s rather slow Javascript engine. And although I have Firefox installed on both computers, I’ve been trying to be a good tester and use IE8 for my every day browsing.

Other impressions of W7: The desktop artwork themes that come “out of the box” are stunning.  I have the landscape photo theme on System #2 and the “United States” photo theme on system #1. Both of them are really really “Oooh” factor type photos. I love that Gadgets are no longer forced along the side of display 1. I have dual LCD panels on system #2 and although you can undock gadgets in Vista, the sidebar app itself still has an overlay on the right side of display 1. Performance wise, I’ve noticed that system shutdown and start up are noticably faster than Vista – much more in line with XP.  On system #2 I have a CPU/Memory gauge gadget running all the time and I’ve noticed that memory usage is 10-15% better and CPU usage, even during peak use is about 5-20% lower.

All in all?  This is the best version of Windows I’ve used. Yep, even better than XP which looks really long-in-the-tooth compared to Aero. W7 looks amazing, functions well and so far has been very stable on all of my applications.  I will definitely upgrade all of my PCs to W7 RTM once its available.

3 Comments

Building OpenSolaris USB installer from Windows

The “official” way to build a USB install of OpenSolaris is to run usbcopy from a command prompt inside a running OpenSolaris system.  Well, ok, that’s not very convenient for me, so I was so happy to see Hiroshi Chonan’s Live USB creator for Windows.

Grab the USB image from genunix.org and you’re about 97% complete with this task.

I wanted to post here because a) this is extremely useful and cool, and b) it’s not explicitly stated on Hiroshi’s webpage, but if you’re running the USB creator on Vista or Windows 7, you need to right-click the program file and choose “Run as administrator” to make sure that the boot sector is appropriately installed on your USB stick.

As you can see in my next post, I’ve installed Windows 7 and OpenSolaris 2009.06 preview (B111a) on my Lenovo S10 netbook using USB sticks for both operating systems.

1 Comment

Wireless support in OpenSolaris 2009.06 for Lenovo S10 netbook

I’ve spent a ridonculous amount of time trying to get my Lenovo S10 netbook’s Broadcom wireless chipset to work in OpenSolaris 2009.06 (build 111, actually.)

I wanted to record here the recipe I used to make this work, since working directions are spread out all over teh Interwebs.

First off, if you’re using the LiveCD or LiveUSB images from genunix.org to install your OpenSolaris system, you’ll need to find a wired connection and jack in to install the following filesets:

  1. SUNWgcc
  2. SUNWhea
  3. SUNWflexlex
  4. SUNWgm4

This is accomplished by doing something like:

$ pfexec pkg install SUNWgcc SUNWhea SUNWflexlex SUNWgm4

Next, download the current ndis code.  The most current as of this blog post is ndis-1.2.3, which you can download from http://www.opensolaris.org/os/community/laptop/wireless/ndis/ndis-1.2.3-prelim.tar.gz

Unpack the tarball:

$ tar zxvf ndis-1.2.3-prelim.tar.gz

Figure out what kind of Windows driver you need to download.  Instructions for doing this are pretty well covered on the ndis project page at OpenSolaris.org.

Download and unpack your Windows driver.  In OpenSolaris, you can simply right-click on the .exe and choose “uncompress” from the context menu in the file manager.  You’ll want to find and copy the appropriate Windows XP .sys and .inf drivers into ~/ndis-1.2.3/i386.

Convert the .inf file from Windows UTF-16 text into good old ASCII then copy of the driver.sys file to ndis.sys.

$ iconv -f utf-16 -t ascii bcmwl5.inf > ndis.inf
$ cp bcmwl5.sys ndis.sys

Next (and this was an endless source of frustration for me) make sure that Sun’s make program (/usr/ccs/bin/make) not GNU make (typically /usr/bin/make) processes the ndis Makefile by setting your shell’s PATH variable correctly:

$ export PATH=/usr/ccs/bin:$PATH

If you do not do this step, you will get strange error messages complaining about not finding header files like cdef.h and bunch of other heartache.

Finally, you’ll want to start building the ndis wrapper.

$ cd ~/ndis-1.2.3/i386
$ make ndiscvt
$ make ndis.h
$ make ndis
$ make ndisapi
$ pfexec cp bcmndis /kernel/drv/bcmndis
$ pfexec cp ndisapi /kernel/misc

Now we’re ready to load the ndis wrapped drivers into the kernel.  Important: The PCI id information below 14e4,4315 is for my particular hardware. You will have to put in your own PCI id information when you want to insert the driver.

$ pfexec add_drv -i '"14e4,4315"' bcmndis
$ pfexec ifconfig bcmndis0 plumb

The following things are broken in ndis-1.2.3 (patches welcome… :)

  • 64 bit kernel support (you have to boot into 32 bit kernel to use ndis)
  • WPA2 (WPA may or may not work – supplying my WPA2 password to nwam causes kernel panics on my netbook)

The good news is that nwam should pick up your new interface and help you get on to your wifi network and remember all of the relevant settings for that interface.

2 Comments

AT&T free wifi offer at Starbucks is useless

Prepare for a righteous rant.

I’m not sure who came up with the idea that I need to jump through 32 flaming hoops to access the purportedly “free” wireless at Starbucks locations provided by AT&T to iPhone users.

It’s a lot more accurate to say that the access is “without charge” rather than “free” because it takes me approximately 2 minutes to get to the front of the line at the Starbucks location closest to my work. It takes approximately 3 minutes to actually get my “free” wifi code from AT&T. Time is money. As I get older I really understand that more and more.

Net effect: no iPhone usage – or at best, I use the over-the-air Internet if I want to kill some waiting-in-line time.

Attention AT&T: Your “free” wifi offer stinks and so does your cellular network. I can only hope that rumors of Verizon getting its own iPhone are true.

What’s really depressing is that everyone expects a new iPhone model this summer and if I get it (my original iPhone 1.0 from June 2007 is coming off contract) then I have to sign up for another 2 years on AT&T. Guess how much I’m looking forward to that.

No Comments

Using Windows Home Server as a Time Machine Target Disk

I finally have something to post here.

I’ve been playing around with trying to get my Macs to back up to my home-built Windows Home Server and I finally got it to work successfully, so I wanted to post about my learnings in the hope that someone else might find them useful.

First, let me give all the technical credit to this blog post here on MediaSmartHome.com which contains all of the information you need to set this up – with screenshots even.

Official word from Apple is, of course, that This Won’t Work and it will strip the paint from your house and possibly harm your household animals.  So with that disclaimer in mind, let’s proceed.

I wrote a simple bash shell script to do all of the Time Machine set up steps which essentially means gathering a bit of system information, then building a disk image (DMG). There is a parameter in the script (properly labeled) which controls the size of the DMG.  You must make the DMG larger than the drive(s) you want to backup.  If you have a 100GB disk, you probably want to make the backup disk, say 150GB. (Don’t worry though, the DMG won’t actually be 150GB until you store that much stuff inside of it.)

The work of actually stashing the DMG on your home server I leave to you, the reader, mostly because I can’t read your mind about where the backup DMG should be placed.

Once that’s accomplished, open the Time Machine system panel, and select the WHS share where you want to put your Time Machine backups.  Then enter the username/password associated with that WHS share when prompted and you should be good to go.

It took my Mac Book Pro about 14 hours to store 50 GB across the wireless network at my house and the MBP was about 10 feet from my access point.

Your mileage may vary. If it breaks, you keep both pieces.

One other learning: I found that if my backup operation were interrupted and the status showed as “failed,” the easiest way to get my Mac Book Pro to re-attempt using the WHS share was to reboot the Mac and repoint Time Machine to the proper share location again.  The reboot was necessary because the DMG file did not cleanly unmount and Time Machine believed that it was still a valid mount even though it was not.

No Comments