Archive for the ‘Life’ Category

A thousand dollars

Wednesday, June 5th, 2013 | Life

Last month, I length my thousandth dollar on Kiva.

This means I’ve now lent $1,000 to third world entrepreneurs who are working their way out of poverty. But the real genius of Kiva is that although I’ve lent $1,000, I’ve only deposited $240.

This is because Kiva doesn’t do donations – they do micro loans. You lend someone the money, usually quite a small amount, and they pay it back when they can afford to. Once they have done so, you can lend it out to someone else! This means that for every $1 I deposit, I’ve actually lent out $4.16 – and that number will continue to climb!

Best of all, Kiva is currently offering introductory loans for free. All you have to do is sign up and you get $25 to lend out to someone without having to deposit anything.

Booking for Nickelback

Thursday, March 28th, 2013 | Life

We live in an age where scumbags often try to rip you off. Paying with basically any method costs you extra money with RyanAir, even though they’ve been told they have to change it by the authorities. So it takes something special to cause outrage these days.

But Leeds Arena and their ticket partner Eventim have somehow managed it. I’ve just booked to go see Nickelback and tickets are at a fairly average £37.00 each.

But then there is a booking fee of £6.30 – per ticket! Presumably, this is to cover the cost of processing the payment, though I notice they don’t even take my American Express.

Then comes delivery – this is £7.50! Of course, I can opt to collect the tickets from the venue itself, in this case, I would have to shell out £2.50! Just to collect the tickets myself! And there is no print them at home option.

That means for £74.00 worth of tickets, I’m paying £20.10 in service charges – making up 21% of the entire cost.

Of course, you can argue that Eventim is just a company and therefore driven to make money, and having a natural monopoly they can just rip people off (we’re just doing our jobs – like the Nazi soldiers who worked in the death camps). But surely at a certain point, the authorities have to step in and say “look, you’re just lying about your ticket prices”, just like they did with the airlines.

Screen resolution drop on Ubuntu

Wednesday, March 27th, 2013 | Life, Tech

If you find your screen resolution suddenly drops too 800×600 on Ubuntu 12.04, the following set of commands may help you resolve it. First, stop the graphical environment.

sudo service lightdm stop

Now remove all the Nvidia packages and reboot the system.

sudo apt-get purge nvidia*
sudo reboot

This will reset you to the default video driver. You now need to reinstall the Nvidia driver, which you can do by going to System settings > Additional Drivers and selecting the top option with the following name.

NVIDIA binary Xorg driver, kernal module and VPDAU library

Select this and click activate. Now reboot your system again and the Nvidia drivers will be re-installed and hopefully working again.

Gnome fails to start after switching Nvidia drivers on Ubuntu

Thursday, March 21st, 2013 | Life, Tech

If you’ve tried to switch to a different Nvidia graphics driver on Ubuntu and suddenly found that X / Gnome will no longer load and all you have is a command line, you can fix it by switching back to the original driver.

jockey-text -l
jockey-text -e xorg:nvidia_current

These commands will show you a list of drivers available, and then activate the standard Nvidia driver.

Selenium Cannot assign requested address

Friday, March 15th, 2013 | Life, Tech

If you’re using BDD (Cucumber or Behat for example) with Selenium, you may find you occasionally get an error where the framework is unable to communicate with the Selenium server.

Failed to connect to 127.0.0.1: Cannot assign requested address

This seems to occur when there are two many requests going to Selenium. This can be alleviated be rewriting your tests to ensure you are now sending too many requests at once.

For example, if you’re using Behat/Mink, then avoid using the wait() function on the Session object, as this can cause excessive requests to be sent to Selenium.

Hollins Hall

Sunday, March 10th, 2013 | Life, Photos

Last weekend, we headed up to the Yorkshire Dales for Elina’s birthday. We stayed at Hollins Hall, which is part of the Marriot chain.

It was quite a nice hotel, they have a big pool, although there were people in it which was always annoying and their spa bath was a bit rubbish. It was nice to have a decent length pool though.

The service was excellent, and the staff were friendly.

We dined in their Heathcliff’s Restaurant, which was OK, though I was a little disappointed by the roast, as the Yorkshire pudding was a bit hard and crispy. The white chocolate sauce that came with the profiteroles was a winner though.

IMG_0321 IMG_0324 IMG_0329 IMG_0323 IMG_0322 IMG_0314

MacPorts mysql5-server not working on boot

Friday, February 22nd, 2013 | Life, Tech

If you’ve installed MacPorts’ mysql5-server, you may find that it doesn’t work after a restart.

This can be resolved by running the following commands to make sure you’ve killed off everything MySQL related.

sudo port unload mysql5-server
ps -ax | grep mysql
sudo kill 

Once you have done this, load it again.

sudo port load mysql5-server

Not it should be working. This is fine, but quickly gets very annoying every time you restart your computer! A common cause is that you have a MySQL sock file in your tmp directory. Removing this may allow it to start automatically.

cd /tmp
rm -f mysql.sock

Once removed, restart your computer and see if MySQL works first time – hopefully, it will.

Install an MSI from a user account

Wednesday, February 20th, 2013 | Life, Tech

Sometimes you might want to install an MSI on your Windows system, without being logged in as an administrator. Normally, you would just right click and select “Run as Administrator” but this option is not available on MSIs.

Instead, right click on “Command Prompt” in the start menu, then select “Run as Administrator”. Once this is running, use the msiexec command to execute the MSI.

msiexec /i Filename.msi

This will then run the installer using administrative privileges.

Copernicus Day

Tuesday, February 19th, 2013 | Life

Copernicus

Happy Copernicus Day!

Data missing from MySQL replication due to column mismatch

Saturday, February 16th, 2013 | Life, Tech

If you are running MySQL replication, you may find that the structure of a table is brought over, but not the data. You can troubleshoot this by logging into the slave MySQL and showing the status.

SHOW SLAVE STATUS \G;

You may find an error similar to the following.

Table definition on master and slave does not match: 
Column 1 size mismatch - master has size 150, example_db.test_table 
on slave has size 50. Master's column size should be <= the slave's column size.

This is usually caused because you are using different character sets. In the example above, the master is set to UTF8 (utf8_general_ci) while the slave database is set up in Latin1. You can fix this in two ways (and should probably do both).

First, to change the database, log into phpMyAdmin and go to the operations tab. Here you change it from the dropdown and then hit save.

Secondly, you should change the default charset in MySQL to be UTF8 (you could also change it to Latin1 if that is what your master is running but in this day and age, everything should really be running UTF8). You can do this by editing your my.cnf.

[mysqld]
default-character-set=utf8

After editing it, you will need to restart MySQL. Any databases created from then on will default to UTF8.