Use Synergy instead of a KVM Switch

On October 31, 2009, in Uncategorized, by Rob

If you've ever wanted a KVM switch, forget about it.  Synergy, an open source tool, replaces a KVM with a free software solution.

A software-only solution, it communicates across the network instead of through dedicated cables, so you can reduce your cable clutter.

Simply tell the configuration where the computers are located relative to each other (i.e. "laptop is to the left of desktop and desktop is to the right of laptop.)

As soon as the mouse passes the edge of the screen, it goes to the other computer mouse and keyboard now act on that machine.  As I write this post my laptop's external monitor is to the left of my desktop, and my server monitor is to the right of my desktop monitor.  One sweep of my hand and my mouse passes across all three monitors.

You can even cut and paste across computers.  That feature is a little buggy, but that's the worst thing I can think of to say about this little gem.

If you're using Vista, be sure to set AutoStart to "When You Log In" instead of "When Computer Starts".  You may also need to disable UAC.  I haven't tried it on Windows 7 yet, but I'm going to guess that the same would hold true.

This would be worth real money, but as open source, it's free, so just enjoy it.

You can download Synergy for free here.

 

You want a website, but haven't a clue how to go about it.  That's OK, everyone who knows how to do it once had to do it for the first time.

Here's a quick guide to getting a website up for very little money, very little work and very quickly.  My solution involves using the free and popular WordPress blogging platform to host your site, and this is a great way to get your first website up and running quickly.

Registering a Domain Name

First, you need to pick a registrar.  That's the company that actually hooks you up with the great registrar of domain names at the heart of the Internet.  Don't worry about the technical details, you really don't need to know unless you want to.  Personally, I don't register my domains where I host my websites.  Too many people lose their domain names in a dispute with a web host when it turns out the web hosting company has control or even technically owns the domain, much to the dismay of the unsuspecting customer.

I use www.easydns.com in to register domains.  It's $20-25/year to register the domain and I've always had good service from them.  If you want to let me have a new affiliate points for pointing you to them use this link to EasyDNS it's your call, I won't beg.

To pick your domain name, go to www.easywhois.com and try out a few names to see if the domain you want is available.  I use that site because they commit to not frontrunning, which is a dirty little trick where a site will offer to do the lookup for you, then slap a 5 day hold on the domain and tell you it's taken, but they can sell it to you – at a price.

When you register your domain name, you'll be asked for the Registrant – that's the legal owner – probably you, as well as Admin, Technical and Billing contacts.  Probably all those people will be you but be sure to keep the info and password in a safe place.  And set a tickler to renew the domain annually.  If you change your email and the reminders don't get to you, you'll lose the domain, which is bad.

Incidentally, you can get a domain registration a little cheaper, but I'm happy to pay an extra $6-7 per year for a registrar who has a good reputation and to avoid registering my domain names where I host my sites.

Setting up your Website

WordPress.com offers two attractive options to host your blog.  If you want to use WordPress to host your site it's free.  But you can also pay them USD$10/year to attach your domain name to their WordPress servers so your domain name is what people go to, not www.wordpress.com.

Either way, you pick one of their WordPress templates.  The template controls the visual appearance of your website.

The downside of using wordpress.com to host your site is that you have to pick one of their templates and there's only minimal customizing possible.  The upside is that they to all the updates automatically – you don't need to worry about maintenance – and it's dirt cheap.

WordPress deals with static content in pages and more chronological content like blogging in posts.  For a resume website you'd want to forget about posts and put up static pages with your resume and contact information.

You can go to WordPress at any time and try them out free.  Join for free and set up http://yourname.wordpress.com.  Experiment with the templates and pick one you like.  There's lots of very good how-to info at http://codex.wordpress.org.  They don't charge for their basic blogging service, but paying the $10 lets you attach your domain name to it, which is a really good idea.

Down the Road

At some point in the future, you can get a hosting plan (roughly $100-$120/year) and use an open source content management system like Joomla to create a more complicated website, but if it's just a resume you'll likely find WordPress all you need and you can't beat the price.

 

Fading out the edge of a photo in Fireworks

On October 28, 2009, in Graphics, by Rob

This is a great technique to use when creating banners and header graphics;

http://www.learnwebdesignonline.com/introfireworks/gradient-masking.htm

 

Imagine you have to write out some attribute names from your database, but want to replace them with more user-friendly versions. For instance, "First Name: " rather than "fname".

An assocative array in PHP will do the trick nicely.

For instance:

1
2
3
// labels array will be used to replace the database attribute names with field labels
$labels = array("lname"=>"Last Name","fname"=>"First Name");
echo "This line displays the ".$labels["lname"];

returns

This line displays the Last Name
 

This code lists reads a dataset from the database and lists all attributes in a table. 

This code sample is deliberately quite basic, though CSS is used (through the $bgcolour variable) to create alternating background colours for the rows.

The code assumes you have already connected to a database.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
echo "<table border='0'>";
// capture the data
$dataset = mysql_query("SELECT * FROM tablename");
// now process the dataset, one row at a time
while ($row = mysql_fetch_assoc($dataset)) {
  // create a variable for each attribute in the record
  //  - variables are easier to use when building the table 
  foreach($row as $var => $value) {
    $$var = $value;
  }
  // set the alternating background colour for the row
  $bgcolour = (!isset($bgcolour) || $bgcolour == "#F0F7FF") ? "#FFFFFF" : "#F0F7FF";
  // build the rows, placing the variables in <td> elements as appropriate
  echo "\n<tr style="background-color:$bgcolour;">";
  echo "\n<td style="font-size:80%;">$attribute</td>";
  echo "\n</tr>";
} // end while
echo "</table>";