Installing phpMyAdmin Advanced Features on Ubuntu

phpMyAdmin

To install the advanced features of phpMyAdmin you have to create a special control database that PMA uses to store bookmarks and relationships etc… PMA comes with a script called create_tables.sql that contains the relevant sql statements to set these tables up. Normally, when you install phpMyAdmin directly from source, this create_tables.sql script can be found in the scripts sub-folder.

Today I was feeling lazy so I decided to use apt-get to install PMA on my Ubuntu machine. However, when I went to enable advanced features, the scripts sub folder was pretty much empty (except for a setup.php script). It seems that with the debian package the advanced feature scripts have been moved to /usr/share/doc/phpmyadmin/examples – It took me ages to work this out, so hopefully this post might save someone some time!

Instructions
Firstly, unzip and run the create_tables.sql file:

cd /usr/share/doc/phpmyadmin/examples
sudo gunzip create_tables_mysql_4_1_2+.sql.gz 
mysql -u root -p < create_tables_mysql_4_1_2+.sql

Then setup a user/password for phpMyAdmin to use:

mysql -u root -p -e 'GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO 'pma'@'localhost' IDENTIFIED BY "password"'

Then edit the config file, and uncomment the advanced features options for your chosen server, and add the user / password you setup in the previous step. If you haven't edited this file before you may need to also uncomment the rest of the server definition.

sudo vim /etc/phpmyadmin/config.inc.php

Army use Xbox-like controller to fly Desert Hawk 3 UAV

In November last year, I saw an advert in which the British Army appeared to use an Xbox controller to fly a miniature UAV. A few people commented on my blog on whether they thought this was real or not, so I decided to find out for certain by sending a Freedom of Information Act request to the Army.

Today I received a reply from the Army Recruiting and Training Division. You can see my original post for the full response, but in summary it confirmed the following points:

  • The UAV shown in the advert is a Desert Hawk 3, which is currently deployed in Iraq
  • The plane uses an XBOX-like controller, but it is not exactly the same. Specifically, it does not have any Microsoft branding nor a wired headset port.
  • The advert was specifically designed to show people that (gaming?) skills developed prior to joining the Army can come in useful during current operations.

I’m actually pretty satisfied with their response. To be honest, after receiving a somewhat negative answer from the press office when I first enquired I was expecting more of a fight before they gave anything away.

Desert Hawk 3 Facts

Length: 36 in./91 cm.
Wingspan: 54 in./137 cm.
Wing area: 504 sq. in./1283 cm.
Empty weight: 6.5 lbs./3 kg.
Payload growth: Up to 2.0 lbs./ 1 kg. or 288 cu. in./ 732 cu. m. 
Endurance: 90+ min.
Portability: Backpack or small suitcase 
Operational range: Up to 15 km./9.3 mi. depending onfrequency and configuration

Fixing the backspace key with OS X and Linux Screen

Here’s the problem: You ssh in to a linux system from your Macbook’s terminal and join a shared “screen” session. Instantly your backspace key stops working as a backspace key and becomes a forward delete key, resulting in those annoying “Wuff Wuff” messages at the bottom of your terminal.

Well I found a solution to this tonight. Simple do the following:

  1. Go to Terminal > Preferences > Settings> Advanced
  2. Tick Delete sends CTRL – H

Et voila. It should be fixed.

Changing the Sent Items folder in OS X Mail

We have a linux IMAP server that uses “Sent” as the default name for it’s Sent Items folder. However, at least in my case, the OS X Mail app seemed to expect the folder to be called “Sent Items”.

To set the Sent folder to be pointed at the correct Sent Items folder, you must select that folder from the account tree, and then select Mailbox > Use This Mailbox For > Sent.

It took me a while to work this out, so I have posted here for future reference.

How to show Wireless Network Connection Speed in OS X

It took me a while to find out how to do this on our iMac, so I thought I would blog it for future reference. If you want to find out what speed your wireless network is connected at on a Mac, you can do this with the “Network Utility”.

  1. Go to Finder
  2. Press CMD + SHIFT + U to open the Utilities Folder (or navigate there through Applications)
  3. Open Network Utility
  4. From the info tab, select the network you are interested in.
  5. The link speed will be shown in the interface information window.

The link connection speed is highlighted

Free our data!

The Guardian have been running a campaign for the past 2 years to free public information that tax payers have paid to collect but the government currently charges for. Coincidentally, this is nearly as long as Fubra has been interested in making such data available for free.

Free House Prices

We launched our first free data service back in January 2005 with a house price information service called OurProperty.co.uk. A month earlier, the Land Registry had announced that they were going to be selling all the price paid data that they collect in bulk. I spotted this and gave my business partner Brendan a call. Together we agreed that we would buy all the data, but rather than resell it on (as the Land Registry had expected us to do), we would give it away to users for free, and make a little money from advertising.

We were the first site to commit to giving this data away for free forever, and this decision went down incredibly well with our users. Within a week we had 100,000 nosey neighbours signed up to the site. Seeing it’s success, a host of other sites soon joined in the free data party.

Free Petrol Prices

Later that year we spotted another opportunity to give away some data. The AA’s petrolbusters site had closed down, and there was a gap in the market for a petrol price information site. Brendan made a few calls to find a supplier for the data, and within week or two we had launched PetrolPrices.com.

We linked these 2 sites together with a single login (which we call the Fubra Passport), and in the 3 years we have been running them they have grown to have almost 2.5 million subscribers. People love our regular house and petrol price alerts, so they can see what’s going on near them, but this is just the start.

Free our data

If the government were to make more data available we would literally jump at the chance to build more services for our users. I’ve suggested some of my ideas for re-using Land registry data to Charles Arthur and Michael Cross at the Guardian and they published these today:

  • A property metadata service, calculating building and land area for all UK properties. Would allow people to know the price per sqm that properties were on sale for.
  • A land use timeline, showing building growth through time overlaid on a map.
  • Identifying building plots for self-builders by finding properties with large gardens within a local development plan.

This is just the tip of the iceberg. It took me about 5 minutes to come up with these ideas, but I’m sure if I sat down with the rest of my team for just an hour we could think of hundreds more. The point is that there are an infinite number of innovative uses for our data that are just waiting to be built, but they will only be realised if the data is made free and open. These ideas will create new businesses, new jobs, and therefore boost our economy.

That is why we must commend Charles and Michael (and the Guardian) for pursing this issue. I’m confident that with continued effort, the dream of free data will become a reality.

Encoding mp3 audio with ffmpeg on Ubuntu Hardy

If you already have ffmpeg installed (without mp3 support), then firstly uninstall it.

MP3 support isn’t included with ffmpeg in the default Ubuntu repositories so to get it you have to enable the Medibuntu repos (assuming this is legal in your area).

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O - | sudo apt-key add - && sudo apt-get update

Then you can install ffmpeg and the libmp3lame codec (part of the libavcodec package)

sudo apt-get install ffmpeg
sudo apt-get install libavcodec1d

You can verify the dependencies of ffmpeg with ldd

paul@paul:~/Videos$ ldd /usr/bin/ffmpeg 
	linux-gate.so.1 =>  (0xb7f07000)
	libavformat.so.1d => /usr/lib/libavformat.so.1d (0xb7e72000)
	libavcodec.so.1d => /usr/lib/libavcodec.so.1d (0xb7997000)
	libavutil.so.1d => /usr/lib/libavutil.so.1d (0xb798c000)
	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7967000)
	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb794f000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7800000)
	libz.so.1 => /usr/lib/libz.so.1 (0xb77eb000)
	libogg.so.0 => /usr/lib/libogg.so.0 (0xb77e6000)
	libdc1394_control.so.13 => /usr/lib/libdc1394_control.so.13 (0xb77d6000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb77d2000)
	liba52-0.7.4.so => /usr/lib/liba52-0.7.4.so (0xb77c7000)
	libgsm.so.1 => /usr/lib/libgsm.so.1 (0xb77ba000)
	libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0xb7725000)
	libtheora.so.0 => /usr/lib/libtheora.so.0 (0xb76db000)
	libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb76b3000)
	libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0xb75ba000)
	libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0xb74a2000)
	libx264.so.57 => /usr/lib/libx264.so.57 (0xb7417000)
	libfaac.so.0 => /usr/lib/libfaac.so.0 (0xb7406000)
	/lib/ld-linux.so.2 (0xb7f08000)
	libraw1394.so.8 => /usr/lib/libraw1394.so.8 (0xb73ff000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0xb7318000)
	libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7316000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb72fe000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0xb72fa000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb72f5000)

It should then let you encode videos with mp3 audio…

ffmpeg -i jonathan-davis-news24-2008-01-22.avi -f flv -s 400s220 -acodec mp3 -ar 44100 jd.flv

Fidler’s castle

I have just seen a fantastically creative scheme to get round the restrictive planning laws that we have in the UK.

Fiddlers castle

On New Homes From Hell (on ITV1) a farmer called Robert Fidler described how he built a house in secret, surround by massive haystacks, and then kept it hidden for four years.

He owned some green belt land, but knowing that he wouldn’t get planning permission to build a house on it, he decided to try to exploit a loop whole in the law which states that if a council doesn’t object to a new build property after four years, then planning is not required.

So all Robert needed to do was hide his house for 4 years.

 

 

Then once the time had passed, he pulled down the bales of hay to reveal his very own castle.

 

Fiddlers castle 

Robert has lived there since August 2006, but he is not in the clear yet. The council are trying to have it demolished saying that, since no-one was given a chance to see the house, the 4 year exemption is invalid.

Using Xserve Server Monitor with localhost

Our new XServe arrived today and one of the first things I decided to test out was the Server Monitor application. From the Server > Configure Local Machine I set up a static IP address on Port 1 of Lights Out Management interface, but when I tried to connect to this from Server Monitor, it failed with the following error:

4/10/08 5:49:33 PM: Failed to contact server

The strange thing was that I could connect to it from another mac on our network. So I then tried to connect to localhost instead (127.0.0.1), and this immediately worked!

Keeping Fit = More accurate maps

My fiancée, Aimi, recently persuaded me to run the Bupa London 10K with her and as it’s only about 7 weeks away we are now having to train every other night. I’ve never been a particularly good runner and, if I’m honest, I find running pretty boring. However, using a GPS device I have found a way to motivate myself and give each run a greater sense of purpose.

The Open Street Map is a project that aims to create a free and editable map of the entire planet. They rely on volunteers, such as me, to create GPS tracks, and then for us to add and edit details on the map.

Now when we go for a run, I take the GPS with me and record the track we take. When we get back home I can then upload the track to my computer and using the JOSM map editor I can literally draw the roads straight on to the map.

OSM currently has good coverage of the main roads and motorways, but it lacks data for a lot of residential areas. So now, through my running, I am gradually mapping the residential roads of Farnborough.

Before

After

The estate I live on was only built a year or two ago and because of this it doesn’t yet show up correctly on any of the major map providers (which is a pain when getting some delivered!). This means that, thanks to my recent contributions, Open Street Map now has the most accurate map for our particular area.

If you extrapolate this trend a few years in to the future (when all existing roads have been covered) it is easy to conceive a time when OSM will be the most accurate map around. Think about it: residents of a new estate are a lot more motivated to ensure that it appears correctly on the map than the traditional map suppliers, and with OSM this process is easy.

Once this happens, delivery companies will start using it, and possibly even contribute to the project as well (a little investment of time by UPS / Tesco uploading their delivery tracks, could save their drivers a lot of time). So simply put, I think Open Street Map is the future of mapping.

Incidentally, if you would like to sponsor me on my run then you can do so here.