AlexBarnes.co.uk
The Personal and Technical Blog for Alex Barnes

Exam Results

July 2nd, 2008 by Barney

I managed to get a first class honours for my overall degree, making all the hard work worthwhile and allowing me to take up my job.  I also managed to achieve 96% for my group project mark, which is amazing, apparently there will be some kind of award made for the group project on my graduation ceremony day, so I shall await what that might be.  Hopefully now I should have a bit more free time to write up on some of the posts that I was hoping to do.

Posted in Uncategorized | No Comments »

Use your PC with Firefox to mimic an iPhone

June 1st, 2008 by Barney

Well it seems that certain websites have special offerings that are unique to IPhone users (such as Zinio ‘www.zinio.com/iphone’, who offer free online versions of a variety of magazine, such as Men’s Health amongst others). The method that these websites appear to use to restrict access to the pages to just iPhone users seems to rely on the ‘User-Agent’ property of the browser (which identifies the browser being used to the website and would normally be something like ‘Internet Explorer’ or ‘Firefox’). It is therefore possible to gain access to these pages by changing this browser property to read as ‘Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A102 Safari/419 (United States)‘.

If you are using Firefox (and why wouldn’t you be?), this can be achieved easily by following the following steps (though there are extensions for Firefox that make this process even easier!):

  1. Open firefox and type ‘about:config‘ into the address bar, this should bring up a configuration page for Firefox
  2. Right-click anywhere on that page and select ‘New‘ followed by ‘String‘ in the popup menu that appears
  3. In the dialog box that is now visible asking for the ‘Preference Name’ enter the following ‘general.useragent.override
  4. The next dialog box will ask for the value of this preference item, for this enter ‘Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A102 Safari/419 (United States)

Et Voila, any site that uses this method of validating visitors will think that your computer is an iPhone and serve up the same pages it would serve to an iPhone (try visiting Facebook to see the different version of that site too!), if you find any more interesting sites, please leave a comment below. If you want to make your computer act normally again, go to the same page in Firefox, find the value that you created using the above steps, right-click on it and select ‘Reset’.

Posted in Uncategorized | 1 Comment »

RegEx to remove XML tags

April 28th, 2008 by Barney

The following regular expression should remove all tags from an XML document e.g. “<name>Alex</name>” should become “Alex”.  I used this to recover the text from a word document when word could no longer open it (document.xml contains the document contents in XML format if you change the documents file extensions to a .zip and open it as an archive).

Regex:  <[^>]*>

Posted in Uncategorized | No Comments »

Registry Edit to Move the Location of ‘My Music’ and Other User Folders

March 25th, 2008 by Barney

Can be modified by the keys in the following registry location:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Posted in Uncategorized | No Comments »

Minimise Outlook 2007 to the System Tray

March 25th, 2008 by Barney

It is actually very easy to get Outlook to minimse to the System Tray (provided you know how to do it - the option is quite well hidden) - this saves space on the taskbar, leaving Outlook to run in the background providing notifications.  To achieve this, simply right click on the icon that is already in the taskbar when running, and tick the ‘Hide When Minimized’ option and voila - next time you minimise Outlook, it should reside in the system tray.

Posted in Uncategorized | No Comments »

Renaming my SLU2 in Debian

March 23rd, 2008 by Barney

When I installed Debian on my SLU2, it gave it a random computer name, to allow easier access (and something that is easier to remember), I decided to rename it.  This was achieved by editing the file /etc/hostname using nano as root, done with the following command:

sudo nano /etc/hostname

This file simply contains the computer name and can be edited to change it, it will however require a reboot for the change to take place.

Posted in Linux, NSLU2 | No Comments »

Exam Timetable

March 20th, 2008 by Barney

Well the provisional timetable has been posted for my final year exams, it looks pretty scary - seven exams crammed over 8 days (with only a break on the Sunday) and it all kicks off in exactly 10 weeks time which wouldn’t be too bad, except that in the mean-time I have a load of courseworks to finish off, including a Robotics lab write-up, a Simulation to construct, run, analayse and write a report about and a really stupid LabView assignment to do and write up not to mention I need to do a hell of a lot of work on my group project which is worth a 1/4 of the year, including finishing the work on the robot, ready for the competition in Hannover in less than 5 weeks, writing the technical report and finally giving a presentation on the project. So all in all a hell of a lot of work to do - arghh! Just hope I can pull off a 2.1 this year so I can take up my job offer.

Posted in Diary | No Comments »

Installing and Running Irssi

March 5th, 2008 by Barney

As previously mentioned, I have installed Debian on my SLU2, so I have no been playing around with applications to put on it. One such application is Irssi, an IRC client. Installing it was a piece of cake thanks to the ‘apt-get’ command, all that had to be done was to type ’sudo apt-get install irss’ followed by typing in my password and hey preto, Debian went and got the application and installed it all on it’s own.

To run irssi from the shell, you will probably want to use a screen (I will cover this later), which essentially allows you to leave the program running and switch backwards and forwards from using it, allowing you to run other things simultaneously.

Once inside a screen, type ‘irssi’ to start up the client. The next step is to connect to a server, which can be achieved by typing ‘/connect servername.co.uk’ . Once connected you have to join a chat room, by typing ‘/join roomname’. Other interesting commands, /exit typed in the status window will shut irssi down, you can cycle between rooms you are in by pressing Ctrl+p (previous room) or Ctrl+n (next room) . Typing ‘/whois username’ will provide more information about users. ‘/help’ provides a list of available commands, whilst ‘/help /commandname’ will display help about a particular command. ‘/n’ will list all people connected to a particular channel.

Posted in Linux | No Comments »

My brand new Linksys NSLU2 now running Debian

March 4th, 2008 by Barney

The Linksys NSLU2 (Network Storage Link USB 2.0) is a device containing two USB ports and an ethernet port, which allows you to connect USB hard drives to it, and access them via the network, kind of like a NAS (Network Attached Storage) device. In it’s default “out of the box” state it seems to have recieved mixed reviews, however there is a neat hack that can be applied to it (which was my sole reason for buying one), which is that since the Linksys firmware is based on Linux, they have had to release the source code, allowing much cleverer people than me out there to develop flashes for it. Anyway to cut a long story short, it is possible to flash the firmware with several linux distros, such as Debian.

Installing Debian was actually a suprisingly easy process (although on my first attempt I tried to flash with an old version of the Debian unslung firmware which didnt work). I followed the instructions at http://www.cyrius.com/debian/nslu2/ which essentially involved using the linksys web interface to flash the firmware, follwed by using SSH to connect to it to carry out the full debian install. Hey presto, a fully working linux distro that I can use as a remote PC for just £50′ish and even better than that, it draws a max. of 10 watts (ignoring the power requirements of any attached devices) - which should cost around about £5 a year to run, compared to the couple of hundred that running my PC for the same period of time would cost.

Posted in Linux, NSLU2 | No Comments »

My Presentation on CTSim

February 26th, 2008 by Barney

CTSim is an open source piece of software which simulates CT (computed tomography) scans. I have been tasked to investigate this software as part of my ‘Remote Sensing and Global Modelling’ course and provide a demonstration in a lecture a slot tommorrow. Once I have researched this, I will place my findings and a copy of my presentation here.

Posted in Diary | No Comments »

« Previous Entries