Matthew Hutchinson

about

Matt is a web developer from N. Ireland. He currently runs Hiddenloop and works in Dublin. Want to find out just a little bit more ?

An audio feed is available for the latest articles at matthewhutchinson.net, find it here.

Auto-syncing your local database from a remote MySQL Server (Dreamhost)

posted on Monday, the 24th of April 2006 at 09:13 in , ,

While redesigning this blog (which I still havent finished), I thought it would be a good idea to setup an automatic synch; from my Live Typo database at Dreamhost – through to my local Windows machine. Setup as a daily cron, I now have all my Typo data fed through to my windows machine, including all the posts, and settings I add and change here on the live site.

My local Typo install runs on Apache with FastCGi and MySQL. The cronjob on dreamhost runs daily at 9pm (when im sure that my local machine is turned on) – and simply calls this mysqldump command.

mysqldump --add-drop-table remotedatabasename -h remotehostname -u
remoteusername -premotepassword | mysql -u localusername -plocalpassword
-h localhostname.no-ip.org localdatabasename

In order for this command to work, you’ll also have to setup the following;

  • Your local MySQL server must be configured to allow incoming connections from remote machines.
  • The MySQL user on your local server to access the database, should be configured to allow login from a remote connection, or a specific IP (e.g. your Dreamhosts box, IP address or hostname)
  • If you use a hardware firewall/router on your local machine, it must be configured to port forward on MySQL (usually port 3306) – to your local machine that has MySQL running.
  • Unless your firewall or local machine has been issued with a static IP, your going to need to use a service like No-ip.com - that gives your local router or PC a hostname you can always reference - and that is automatically updated when changed. After registering, No-ip.com offer this as a free service.

Multiple SVN users on Dreamhost

posted on Monday, the 24th of April 2006 at 05:56 in ,

I recently recieved an email from Jonathan Arthur of OpenWebDesign, asking how I had managed to setup Subversion on Dreamhost with multiple SVN users. The Dreamhost SVN wiki page goes some way to explain the process, but heres what I did (with success);

The process is a little tricky, due to folder permissions and the way dreamhost sets up users and groups.

This mini-guide assumes you already have one repository setup and are able to access it with a single subversion user – as described in the dh SVN wiki page

To start, create new users (with shell accounts) to your server; I created ones with usernames like mattsvn etc. Do this in your dh web control panel, under Users->manage users->Add New User. Each of these users will get their own home directory on the dreamhost box.

Now (still in the web panel) create a new group; (Users->Groups->Add New Custom Group) call it something like devteamsvn – and add all your new svn users into this group (also add the user you already had svn working for)

Next – follow dreamhost’s instructions to create ssh public/private keys for each of these users in turn. (doing this in each of the users new home directories)

Take a note of all the passphrases you use – and also keep the public session keys you generate for each user – So they can be handed out for use with “Putty Pageant”: later.

Now, terminal into your dh box (as the orginal ssh user who created the repository to begin with) and change the group ownership (recursively) on the subversion repository folder; ie.

chgrp devteamsvn -R ~/path/to/your/svn/repository

And make sure that this group has full read/write/execute access to all files inside here with;

chmod 775 -R ~/path/to/your/svn/repository

Also – if you have a live web accessible folder online that you want everyone to be able to checkout into; you’ll need to change the group there as well;

chgrp devteamsvn -R ~/path/to/your/web/folder/you/plan/to/checkout/to

chmod 775 -R ~/path/to/your/web/folder/you/plan/to/checkout/to

Your now ready to try it all; Use Putty / Tortoise SVN and Putty Pageant with one of the new users details – Try connecting to the repository and committing a simple change or add.

For this user to checkout/update from the repository on the dreamhost to the dreamhost web folder – simply terminal into the dreamhost box using the new svn users details and run the command;

svn up /home/orginal_ssh_users_name/path/to/your/web/folder/you/checkout/to

Prepping for a MacBook Pro

posted on Tuesday, the 18th of April 2006 at 09:16 in ,

Last week I finally gave in and placed an order for a new 2Ghz MacBook Pro. Being a PC user all my life, this will be my first switch to working on a Mac environment. I chose the MacBook Pro for 3 main reasons;

  • to test websites and work in a mac environment
  • for portability (I currently don’t own a laptop)
  • performance-wise it seems like it will have enough longevity to last me at least 3 years

Gearing up for this monumentous event, Ive been collecting bookmarks of Mac tips and tools I hope will be useful;

And for people switching from Windows to a Mac, or for those trying Bootcamp (Windows on an Intel Mac)

Taking sides in the enterprise argument

posted on Saturday, the 15th of April 2006 at 08:59 in , , , ,

Debate is raging across the web against the Enterprise App, what it stands for, what Enterprise even means and how can companies justify huge complicated projects and budgets on what are essentially the simplest of tasks. Here are some excellent conuterpoints;

From which I quote …

We work in environments where IT budgets are in the tens of millions, and in a number of cases, hundreds of millions of dollars.

Response from Chris,

This is laughable. Huge budgets are usually indicative of run-away architecture and absurd turf-wars and protectionism, not actual success. Most IT budgets I’ve been around could be shaved 30-70% by the judicious use of the word “no”, and the refusal to accept stock answers from astronauts and certification-wielding automatons.

For example, I watched a large government agency—who asked me to do an analysis of mail requirements for an organization of several hundred thousand users—choose the absolute worst option because it was the “industry standard”. It cost 14x more than the lowest cost in simple capital, and had a on-going support run-rate that was approximately 5-6x anything else. The defense was that it was what the “industry” had chosen. The reality is, it was chosen because budgets equal power, and people equal promotions.

Shameless Bragging (1)

posted on Saturday, the 15th of April 2006 at 07:57 in , ,

Jamie at Front has kindly informed me that PaperJam, a Flash website I built last year at Front, has recently been featured in the new Taschen Flash Sites book.

PaperJam (based in Belfast), do some amazing design work, which you can check out at the site – Note this book does not ‘glow white’ when opened, as the photo depicts.

1 comment