Archive for the ‘Life’ Category

Install Go Server on CentOS with OpenJDK

Wednesday, October 17th, 2012 | Life, Tech

If you’re trying to install ThoughtWorks’ Go Server on CentOS (or indeed any Linux variety), you might run into a problem where it says you need JDK installed. Indeed, even if you have OpenJDK installed it may continue to complain.

This is because they have not officially approved OpenJDK yet, so your two options are to a) installed the actual JDK or b) to install OpenJDK to at least the version required (1.6 at time of writing) and then force the installer to ignore dependences. This can be done using the following command.

rpm -i --nodeps go-server.rpm

Providing you already have OpenJDK installed, this should work fine.

FATAL: no pg_hba.conf entry for host ::1

Thursday, October 11th, 2012 | Life, Tech

If you’re getting an error trying to connect to Postgres on localhost, the problem is probably that your system is configured for ipv6 but your Postgres isn’t. You can change this however.

First off, you need to find the pg_hba.conf file.

locate pg_hba.conf

Edit it and find the line which defines the localhost.

hosts  all all   md5

Below it, add the following line.

host all all ::1/128 trust

Finally, restart Postgres.

Installing Postgres PDO driver on cPanel

Friday, October 5th, 2012 | Life, Tech

cPanel offers two options for installing PDO – using EasyApache which can enable PDO and MySQL’s PDO driver or installing everything via PECL. Unfortunately, under PHP 5.3, the PECL installers don’t work, so if you need any other PDO drivers, you’re in a hole.

Luckily, you can install it manually.

Download the PDO driver from the PECL website. Extract the archive and CD into the directory.

wget http://pecl.php.net/get/PDO_PGSQL
tar -xzf PDO-PGSQL-1.0.2.tgz
cd PDO-PSQL-1.0.2/

Once this is done, run the standard commands for building a PHP extension.

phpize
./configure
make
make install

Once this is done, you can add the extension to php.ini.

cd /usr/local/lib/
vim php.ini
extension=pdo_pgsql.so

Finally, restart Apache and the Postgres driver should show up in your phpinfo() output.

Capturing the moment

Monday, October 1st, 2012 | Life

I’ve been meaning to do a photography course for a long time. But every time I look into it I realise I’ve just missed an intake or it’s at least some ridiculous amount of time until the next one starts.

However, being determined to get it done, I made an effort to hound Leeds City College – and I do mean hound because getting information out of them is like getting blood out of a stone. They simply don’t know when the courses are going to be running or provide you with any information on them.

Never the less, I managed to get myself and Elina booked on one, and we had our first session last Monday. The course costs about £150 I think, and for that you get ten sessions of two hour tuition, which seems reasonable.

The first session was general introductions, but was by no means non-informative. We discussed the problems we were having and what areas we wanted to focus on in the first part of the session and then dived straight in to the course material and practice exercises.

By the look of the schedule, it’s very focused around the kind of photography I want to do as well, so I’m very much looking forward to it!

Add a new path to your $PATH variable on OS X Lion

Saturday, September 29th, 2012 | Life, Tech

Sometimes you need to add a new path to your $PATH variable. This is easy to do by adding a new line to your paths file.

cd /etc/
vim paths

Once you have added the path, you can execute any executables in Terminal, without having to specify the full path.

Netgear N150 WNA1100 on Windows Server 2003

Sunday, September 23rd, 2012 | Life, Tech

If you’ve bought the Netgear N150 WNA1100 wireless dongle on the false promise that it is compatible with Windows Server 2003 and then tried to run it, you will probably get an error like the one below.

Not compatible with your OS

Luckily, there is a way around this. Once you’ve downloaded the driver, right click on it, go to the compatibility tab and select the run in compatibility mode check box and select “Windows XP” from the drop down.

Once done, re-run the setup and it should install.

September Wendy House

Tuesday, September 18th, 2012 | Friends, Life

Due to Freshers’ Week, Wendy House was moved to a week earlier – which means Wendy House sooner, but then of course a huge gap between this one and October’s. It also should have landed bang on Norm’s birthday, but ended up seven days earlier – inconsiderate.

Never the less, we took quite a good crowd there – we booked taxis for 19 people and despite still not drinking, I made it to a very respectable 2am before heading home.

Installing Mongo PHP driver on CentOS 6 cPanel

Monday, September 17th, 2012 | Life, Tech

Once again, the PECL installer. In order to get the Mongo driver for PHP working, you need to install it manually.

mkdir mongo
cd mongo
wget https://github.com/mongodb/mongo-php-driver/zipball/master
unzip master
cd mongodb-mongo-php-driver-df8b217
phpize
./configure
make install

Add the extension to your php.ini file.

extension=mongo.so

Restart Apache, and Mongo should appear inf your phpinfo() output.

August 2012 Wendy House

Wednesday, September 5th, 2012 | Friends, Life

I couldn’t be bothered to take my camera to last month’s Wendy House. But we did enjoy a few drinks beforehand under threat of extermination.

Converting CVS to Git, with branches

Thursday, August 30th, 2012 | Life, Tech

There are quite a number of tools to convert a CVS repository to a Git repository out there. However, most of them don’t seem to be able to copy over the branches properly. A work around is to convert it to Mercurial first, then convert it to Git.

In this example I’m using a repository called RedDog.

First, we need to get Mercurial on the system.

yum install mercurial

Next we need to add the convert extension to the .hrc file. This might be a global file, or might be in your home directory, can’t quite remember.

[extensions]
hgext.convert=

Check out from CVS and convert to Mercurial.

cvs checkout RedDog
hg convert RedDog

This will create a Mercurial repository called RedDog-hg. Now we need to get hold of Fast Export.

git clone git://repo.or.cz/fast-export.git

Once we have the software we can initialise a new Git repository that we’re going to use and then CD into the folder.

git init RedDog-git
cd RedDog-git

Run the Fast Export tool, specifying the location of the Mercurial repository.

../fast-export/hg-fast-export.sh -r ../RedDog-hg

This will migrate everything into your new Git repository. If you run an ls -a you should see the .git folder, which you may want to rename to RedDog.git (something.git locations are actually just .git directories).

You may optionally also want to do a check out into that folder.

git checkout HEAD

However, you don’t have to – you can begin using it remotely without doing a local checkout.