Thursday, January 11, 2018

Monitor Connector Preferences

When it comes to connecting a computer to a monitor, you have a lot of choices these days.  Recently I was asked what I would use, and I made a list of my preference in descending order, depending on what is available:

  1. DVI to DVI
  2. HDMI to HDMI or DVI to HDMI (using adapter or special cable)
  3. Etch-A-Sketch controlled by an artistic robot that draws a representation of what is on your screen
  4. 15-pin analog VGA to whatever

Friday, April 28, 2017

Fun with old school weather displays

Ah the 90's.  Everyone has their own opinions of it, but one of my fondest memories is coming home from school and watching the Weather Channel (this should tell you a little about my school experience).  In particular, I was always mesmerized by  "Local On The 8's"  - a computer generated weather display featuring local conditions, forecast, and radar.

A typical screen of the WS4000 during Local On The 8's
 There was a block of time, twice an hour, during which the output of a machine was featured as TV content.  That machine, was none other than the venerable WeatherStar 4000.

The actual hardware was a rack-mount computer
Cable companies would actually install this at their local head-end, and the Weather Channel would cut to it during designated blocks.  The Weather Channel was actually part network, and part local!  A strange concept.

Well, just when I thought I was a geek, the folks at show me what real geekdom is all about.  Their WS4000 simulator, though a bit finicky to get running, is SPOT ON.  See here:

The simulator is almost indistinguishable from the original, aside from the missing logo.
I had to check it out.  It was better than I could imagine.  It works with real, live data from NOAA and can run continuously in a loop.

However, there are a few caveats to getting this running.  They are:

  • You have to run it on a Windows machine. I have not had any success getting it running on Linux.
  • You must install the Microsoft XNA framework.  This is project was discontinued, and as such won't run on some versions of Windows.  
  • You're graphics card may or may not work. I had no luck getting it to run in a VM (VMware or Virtualbox), most likely for this reason.
After lots of experimentation, I determined that it runs great on a bare-metal Windows implementation running Windows 7 or 8, 64 bit.  

My next urge was to set up a live stream, or "TV channel" that my friends could tune into.  I got it running on a machine with the XSplit Broadcaster, and streamed to a Youtube channel.  I put some copyright-unencumbered music behind it, courtesy of one of my old bands.  The little dream was real.  I decided to pursue improving it.

I dedicated the best "cast-off" laptop that I could - an Intel Core i3 running Windows 8, 64 bit, for a long-term test. It had enough processor power to run both the power-hungry XSplit Broadcaster, the WS4000 simulator, and the music player, with a tiny bit to spare for remote access when I needed to get in.  My first problem was dealing with reboots due to silly automatic Windows updates. Microsoft has no respect for what users might be using their machines for.  After I successfully disabled Windows Update reboots, my channel stayed up for 3 weeks straight. The only reason why there was an interruption was that my Comcast connection dropped for a couple of hours, due to a local outage.

If it's still running (as it is at the time of this blog entry), you can tune in here:

With the experiments showing some success, I want to make things better, and scale up.  It would be great if my friends in other counties could get their local weather data instead of mine.  Since I am doing this in my home, in a tiny server closet, I also have to be conscious of space, power usage, and cost.  I searched around and determined that there was one workhorse that was optimal in these categories, but still probably had enough power to do the job: The 2016 Intel Compute Stick.  With its quad-core Intel Atom processor, and Intel HD graphics, it should be good enough to handle all the tasks required while being small enough to add almost no noticeable impact to my tiny home server closet.  At the time, they were going for around $150, which was kind of pricey if I wanted to build a cluster of them.

Fast forward to last week: Our local Radio Shack was going out of business.  They had a couple of these devices in stock for a little over half-price.  They ship with Windows 10, which I did not have any luck getting the WS4000 simulator to work on - but I figured I would find a way to put Windows 7 on them.  I bought out their stock and came home with two Intel Compute Sticks.  

Turns out that the WS4000 simulator runs great on it, out of the box.  Apparently the Microsoft XNA framework is fine on Windows 10, as long as it's the 32 bit edition (which is what the Compute Sticks ship with)!  So we are off to the races.

The next thing I did was design a miniature "rack" for the Compute Sticks to fit neatly into.  These units actually have cooling fans, so I did have to pay a little attention to thermal design.  Since I plan to run them headless, and since the heat exhausts from a vent opposite the HDMI plug, I came up with a minimalist design of a block with 4 HDMI receptacles.  This allows the exhaust to exit topside, and since heat rises, it will not get into the intake of a neighboring device.  

Two Intel Compute Sticks in my Four-up cluster frame
Time to get configuring, and I will be on the lookout for some more of those quad-core Intel Compute Sticks!  

Tuesday, November 08, 2016

Convert your CMS site to static in seconds with a simple linux command line

This little tip will hopefully be helpful to webmasters with deadbeat clients out there.  Scenario: you host site for Joe Smith.  The site runs on ancient version of Joomla, which relies on an old, unsupported version of PHP. It's a pain to update, edit, and worst of all is a huge liability.  You might get paid to get the site reactivated, but you haven't heard from Joe in long enough that you suspect you won't.  You've decided to leave the site functional for another month.  Meanwhile, you have a webserver to migrate.  What is the easiest way to move the site without breaking it?

  1. Run an old version of PHP.  There are lots of problems with this option, which I don't think I need to go into.
  2. Convert it to a static
Imagine if you could have a working snapshot of the site and all of its resources. Images, javascript widgets, CSS, content, everything!  The site is a lot harder to edit (although not impossible), but you are no longer anchored to any PHP version (heck, you don't even need PHP at all), and there is no vulnerable CMS waiting to be compromised, trash your webserver and your reputation.  Brilliant!  But how to do this simply?

There are plugins for various popular CMS which claim to do this.  I have tried some and found mixed results.  In the end it was not what I hoped for in terms of simplicity or end result.

...Enter wget!  A very common linux command-line tool which can suck down websites.  Normally it only downloads content or a single file, but it turns out there are a bunch of argument permutations which can be applied in order to entirely and statically duplicate a living, breathing website. It goes something like this:

wget -P . -mpck --user-agent="" -e robots=off --wait 1 -E

The gist of this command is as follows:
We turn on mirror for recursion and time-stamping, get page requisites to get things besides just the content, such as script files, css, images, etc., continue which will resume a partial download of the site, and convert links which will convert absolute links so they work on a new or local site.  We also ignore robots.txt files which might restrict crawling, and wait 1 second so we don't hammer the other server too hard.

The result is a folder containing all of the files (images, html and scripts) required by the site, placed perfectly to create a 100% working, but static representation of the original site.

Much thanks to Jon Bickar for his post which accurately describes how to use wget this way.