sandy's blog


Lunar Eclipse 2007 from Argyle Street

Here is my view of the lunar eclipse from Argyle Street, Glasgow. Click for a larger image.


New year, New flat

Happy new year everyone! As I've not posted anything here for a long time, I thought I'd just post a photo of the view from my new flat in Glasgow city centre. View from livingroom window


Photos from Podgorica

Here are some photos from the capital of Montenegro over the last 2 or 3 weeks.


COBOL .Net Compiling with Types

In my limited spare time, I've managed to add integer and string types to my COBOL compiler for .Net, and also add the ability to type stuff in at the command line. Numbers, strings and things typed in at the command line can now be set as the values of existing variables. The next step will include floating point numbers, the COBOL equivalent of structs, and maybe some maths. Click the image to watch the flash movie...

Modified Pink Devil Ka

It's got horns. 'nuff said.

Braindump @ 1162050661

My desk as it look right now, taken on a Sony K750i. Today I've been doing some work in preparation for going to Montenegro tomorrow. I've been given a Dell Inspiron 4150 laptop with required software installed - compared to my iBook it seems like a desktop PC - Pentium 4, 1GB RAM, every PC legacy port you could think of, but only 1 USB port. I'm trying to get my contacts transferred to it so I only need to take one laptop with me. My contacts are in Apple Address Book. One of my friends said last night that "Windows is better than Mac becuase Windows is compatible with everything". I'd love if Windows would be compatible with my Address Book backup file, my bluetooth mouse, forwarding X11 applications through SSH (yeah I know it can be done but it's a pain in the ass) and my iSight camera. I'd be happier if it even worked with my Logitech Quickcam which I've lost the CD for. I'm surprised a supposedly modern operating system doesn't work out-of-the-box with 4 year old hardware. What happened to just plugging something in and it works with no human intervention? Here's the best I've found so far for transferring my contacts from Address Book. It exports Address Book's database to CSV (Comma Separated Values in a text file). This works, but Thunderbird on Windows seems to b0rk at the first unicode character it sees, and Outlook 2007 refuses to open it at all. So I tried opening it in Excel, thinking that importing CSV is a standard feature in spreadsheet applications. Excel's version of importing CSV today seems to be making a spreadsheet with lots or rows and one colum that contains text with lots of commas. So much for the commas separating the values! Next random thought: Can anyone tell me where the lyrics "I'm a locksmith with the key to fame" came from? A quick google search will reveal the answer, but I'm surprised there is only one relevant result on Google from the two it vame up with. And Trevor McDonaldly, the thing that's been annoying me all week... Reduced Fat Crisps. If I wanted to reduce my fat intake, I certainly wouldn't be eating crisps. However, I eat crisps when I feel like having a snack, but I'll consider cutting crisps out of my diet if confectionery companies continue producing these reduced fat crisps - they taste horrible. 70% less fat and 70% less taste in my opinion. Find out more about 70% Less Fat crisps on the Walkers website.


Not My Kinda Blog

Today I accidentally stumbled upon somewhere that is definitely not my kinda blog. Why? Because they are advertising on Google that their site is up and running, but when I try to view it I get an error message and I get it every time I click on a link. I guess it's just one more site aiming at the now moving target of Internet Explorer and not simply following standards. They could at least hold off their advertising campaign until they get their site working in a standards-comliant way.


Amazon Sells Used Condoms For $0.98


Compiling COBOL for .Net

I spent a little time this evening beginning to write my .Net COBOL compiler. After that, I played around with software for recording what I'm doing on my desktop and saving it as a Flash movie. Click on the image below to view a quick preview of the compiler in Flash...


Hacker Test

I was surfing the web while watching Channel 9, and came across a link to Suzanne Cook's university homepage. Suzanne, who now works for Microsoft on the CLR team, has the hacker quiz on her page. I took the test for fun, but some of it could do with updating for the 21st century. I'm sure an increasing amount of people newly emplyed in the IT industry have never heard of half of the stuff mentioned in the quiz. And as for one of its questions, "Do you have a disk platter or a naked floppy hanging in your home?" - I don't but my dad has a homemade Sony Laserdisc clock hanging on the wall :-) I got a disappointing "nerd" rating, based on my score of 136 (decimal) and the following score table:
0x000 and 0x010Computer Illiterate
0x011 and 0x040Computer User
0x041 and 0x080Computer Operator
0x081 and 0x0C0Nerd
0x0C1 and 0x100Hacker
0x101 and 0x180Guru
0x181 and 0x200Wizard
(Sorry if there are expanses of whitespace in this post, blogger doesn't appear to like HTML tables much)

Mac OS X UI Consistency

Today I decided to include an image in a blog post, for the first time even in my blogging history. While reading a recent article about user interface inconsistencies in Vista by Paul Thurrott, I began thinking of UNO, which I installed on my Mac Mini and iBook earlier this week (and has the excellent catchphrase of: "Several ways to skin your Cat"). UNO fixes some user interface inconsistencies in OS X applications. It takes the smooth silvery-gray appearance featuring the unified toolbar and title bar that Apple Mail has in Tiger, and gives you the option of applying it to all applications. Alternatively, you can take the "Polished metal" UI that iTunes has and apply that to all applications. I thought Microsoft was bad for user interface inconsistencies, but looking at a computer without UNO after using it for a few days make me realise how bad Apple are for this too. I guess it was originally hidden by the shininess of the Aqua and [Brushed|Polished] Metal UIs. UNO is good - you should try it. (To get Firefox looking that good, you'll also need the GrApple theme from the bottom of this page)


Wikinfinite Loops, Again

I've been keeping track of the articles I've been reading on Wikipedia. As I mentioned earlier this year in my blog, Neil's Wikinfinite Loops article prompted me to write a script to pull Wikipedia items from my browser history. Here's yesterday evening's Wikinfinite Loop after I got home from work... COBOL ALGOL 58 RCA David Taylor Model Basin Thomson SA Marconi Company Ship model basin Stroboscope Phenakistoscope Guglielmo Marconi Grand Council of Fascism Cabot Tower Cabot Tower (Bristol) Editing Guglielmo Marconi (section) Guglielmo Marconi Cabot Tower (Newfoundland) Fascism Benito Mussolini Marconi Marconi COBOL Michael A. Jackson After discovering how much I use Wikipedia, I set up an Automator task on my laptop to dump the list of URLs each day.

WAP Woes

Last week the WRT-54G access point in our flat rendered itself useless by putting all of its lights on solid, apart from the WiFi one,a nd not responding to anything. None of the usual ways of reviving Linksys boxes worked. It's now retired to the spare parts box. The backup access point was is an Apple AirPort express. While it handles AirTunes nicely, it seems rather unreliable as an access point, having been rebooted twice in about a week. I've heard that Linksys's WAG-54G is of similar reliability, so I'm not sure what to get next. Draytek or Netgear are looking like good possibilities. The WRT-54G lasted about 5 years of never being turned off apart from when I moved house (with no crashes or hangs), so it's been pretty reliable until now.

Open-source multi-platform COBOL compiler?

I'm looking for an open-source multi-platform COBOL compiler. I've found some open-source COBOL compilers (eg. TinyCOBOL), none of which are multi-platform. I've found some free-for-students COBOL compilers that are multi-platform, but aren't open-source (eg. NetCOBOL). Could anyone suggest an open-source COBOL compiler that works with either of the PPC or SPARC architectures? I'm just curious about how they're designed.



I installed Solaris 10 6/06 on an UltraSPARC yesterday, with the default settings, and today I did a quick port scan to see what wasn't firewalled... 21/tcp open ftp 22/tcp open ssh 23/tcp open telnet 25/tcp open smtp 79/tcp open finger 111/tcp open rpcbind 513/tcp open login 514/tcp open shell 587/tcp open submission 898/tcp open sun-manageconsole 4045/tcp open lockd 7100/tcp open font-service 32774/tcp open sometimes-rpc11 32775/tcp open sometimes-rpc13 32776/tcp open sometimes-rpc15 32777/tcp open sometimes-rpc17 32778/tcp open sometimes-rpc19 32779/tcp open sometimes-rpc21 32780/tcp open sometimes-rpc23 32786/tcp open sometimes-rpc25 32787/tcp open sometimes-rpc27 Shocking. I'll be keeping the Sun boxes behind a firewall then.



We've got tickets for Download Festival at Donnington Park from 9th to 12th June. Train tickets are booked too, so all we need now is a tent. This weekend will hopefully involve hillwalking, mountain biking and a subcrawl. Then on either the 21st or 22nd of April, I'll be off to the 19th annual Paisley Beer Festival.


More photos from Poland

More photos from Poland are now online. They were taken in Opole and Wrocław on an Olympus digital camera. Photos from the Canon EOS will follow soon.


Camera phone pics from Poland

Here are the first few photos from Poland. Once I find a way to get the photos from my digital camera, more will follow. Leaving Prestwick Airport Door of the Cathedral in Kraków Tesco in Opole Beer glass collection 15.1% beer 2L Mountain Dew bottle


Using Perl/Cocoa to read OS X plist files

Today I wrote my first Cocoa Perl program - I'm following the tutorial about plists on I got the idea after reading Neil's Wikinfinite Loops article. The program reads my Safari browsing history and outputs a list of the Wikipedia articles I've been looking at today. I found this website useful in learning enough Cocoa/Objective C to get this done. My Program: Sample Output: wikiloop.html


Programming: Multiple Precision maths and Encryption

Since last Tuesday afternoon, I've been learning about and implementing a secure key exchange and encryption algorithm, using Blowfish and the Diffie-Hellman key exchange. I've been doing this in C, using the freely available BigDigits library for dealing with large prime numbers. I've found the BigDigits library to be very handy, and it seems to be quite efficient. I've written my own functions to wrap up Blowfish in a way that character buffers can be passed from one machine to another over the network, with encryption that's transparent to the application (at the socket level). Next, I'd like to get the same thing working in C#, but I discovered today that the C# library provided be the people who wrote BigDigits actually just imports Win32 DLL functions and presents them in a nice .Net-friendly way. I'm intending my code to run on Mono as well as Microsoft .Net, so I think writing the algorithms in pure C# is the approach I will be taking.


MP3/WMA CD Player for the Lotus

I eventually got fed up of the Clarion head unit that came with the Lotus not being able to play anything other than CDs I've bought from shops - it couldn't even play CD-R audio discs. Today I went to Braehead at lunch time and installed an Alpine CDE-9845RB MP3/WMA CD Receiver which can play CD-RW discs. It was £100 cheaper than the same thing with iPod support, and as it only takes a few minutes to burn a CD-RW, I couldn't justify the extra money. It's also got clearer sound at higher volumes than the Clarion one did, which is very useful in a car where you can't hear much above the engine :-)


Weekend in Edinburgh

On Saturday, Agnieszka and I went to Stephen and Megan's housewarming party. We had a great night, and I remember drinking a lot of Żubrówka and eating some lovely Polish food. On Sunday afternoon, we walked up Arthur's Seat. It was surprisingly warm and sunny for January. At the top, we got photos looking North West, Nort East, and one of ourselves.


Gym and New Car

The week before last, Agnieszka and I started going to Bellahouston Leisure Centre to play badminton. I've not played for about a year, and I've forgotten most of the rules, but it's all good fun anyway. Once I find my book about it, we'll start following the rules. Last week, I got my new car - a Lotus Elise convertible which I traded the MG in for. Highly impractical, but so much fun. Here is a photo of me standing next to it, and here is a better photo of an identical one (apart from being left hand drive and having foreign plates on it). It's a 2002 model, and has a low milage. I got a Samsung D500 mobile phone to replace my Nokia, and as soon as I find a way of getting photos off it, I'll post pics of the new car and maybe tomorrow's Christmas work night out.


Birthday and Concert

on Firday night I was at Michelle's 21st birthday night out at Khublai Khan in the Merchant City. The turnout was great and the food was amazing. I'd definitely go back there. On Saturday I was at the Bloodhound Gang concert with Michelle, Dave, Neil, Ceri, Charles, Howard and Stuart. It was such a good performance, and I managed to end up almost at the front of the crowd. Now I'm preparing to drive to Dornoch in the morning where Agnieszka and I will be staying for a night. Looks like it'll be better weather there than in Glasgow, and then the possibility of snow on Tuesday.


Life Update

I've now being going out with Agnieszka for 4 weeks today, and what a fun 4 weeks they've been :-) We had a Halloween party last weekend, which had a good turnout. Photos are available here. Work has been really busy over the past 3 weeks, and I've had a few 10-hour days. I think coffee has been the only reason I've been awake some days. I've been too tired or spent too much time going out or partying at weekends to get much more mountain biking done. I'll probably squeeze another trip to Pollok Park in soon. Climbing is fun! I was at the Glasgow Climbing Centre with Neil and Jamie on Monday. It's the first time I've done it since the climbing wall at school. I need to work on my upper body strength (or just learn to climb properly as Ceri points out).


I've switched to using Flock as my primary web browser at work now, mainly due to its close integration with I have almost 700 bookmarks, and keeping them organised without a service like would be a nightmare. Flock is a slightly larger installation than Firefox, but it seems quicker.


Kyle's 25th

This weekend started off with Kyle's 25th birthday celebration. Dave and I had a few pints in The Counting House then moved onto The Phoenix. Scott, Michelle, Mrben and Mrsben moved on to Frankenstein's where I stayed until it closed. I went for lunch with Agnieszka (who I met the night before) in La Vita on Saturday then went to visit Stephen in Edinburgh and helped with some sanding. In the evening I met up with Agnieszka again and joined Ceri and various friends for Stephen's (a different one, who I'd not met before) birthday night out at Bar Soba.


My First Glentress Visit

Today I got up early (7am's quite early for a Sunday) and got ready for my 1st trip to Glentress. Charles picked me up and him, Howard and I went to Glentress with our mountain bikes. We did the red route (17km) and a few bits of the black route. Most of the Black route looked too difficult to attempt until I get some more practice in. Sadly no photos though as my camera's a bit too big to take. Howard's taking his with him next time though. The routes can be seen on this map. After dinner we went to The 1901 and met up with Stuart and Ceri. I tried a few pints of Timothy Taylor Landlord for the first time, it's quite a good ale.

Another busy weekend

I've tried a few more ales this weekend, namely Cairngorm Wildcat, Roosters YPA and Doctor O'Kell's IPA. I met up with Kev, Carol, Scott and Dave for a few drinks on Friday night, then went on to meet Gayle at the GUU. We discovererd it was the Swimming Team's night out :-) On Saturday morning I bought a Camelbak in preparation for Sunday's trip to Gelntress. Saturday afternoon saw another pub crawl followed by Sara's 21st birthday party.


Comedy Club

On Sunday night I ended up being too tired to The Shed and stayed in and messed around with Mono and XSP instead. Monday was my Mum's birthday so I went down to visit for a while, then struggled to get to The Stand without being too late for Dance Monkey Boy Dance. This is the first time I've been back at the stand after their few weeks off at the end of the summer. I've been working on a project involving CGI scripts running inside Apache web server on Microsoft Windows this week, and not having a good time. Apache randomly crashes and usually takes 5 minutes to pass requests onto the Perl script. I'm now building Apache 2 from source to attempt to work out what's going wrong.


More Beer

So Saturday night was the second night of exploring different ales this weekend. Michelle and Scott arrived around 17:00 and we watched two episodes of The OC which Scott had on his iBook. I had another look at converting pairs of lattitude and longitude coordinates into distance in miles. We headed off to the Bon Accord but unfortunately arrived just after they stopped serving food. That turned out not to be such a bad thing... I discovered yet another thing I really like about this place... they let us bring in an Indian takeaway from Panjea and provided us with plates and cutlery. I had Old Peculier, Magus and Godiva before we moved on to Solid Rock which was having a big celebration for its 30th birthday, then onto Bloc where I met a nice French girl who I'm going to meet up with at The Shed tonight.


End of the Week

I've started experimenting with the Google Maps API, and overlaying information from my Pubzilla database. I must say Google's API is very easy to use, although I seem to have had less success in getting to work with Internet Explorer. Yesterday I felt like a random night out, so got in touch with some people and John, Scott and I started off at the Three Judges which is a real ale pub. I tried three different ales: Highwood Harvest Bitter, Ridley's Spectacular, and Buffy's Hopleaf. We met up with Malcolm, Michelle and Miranda there then moved onto The Goat where we met up with David. Malcolm and Scott went their own way, the girls went home, and David, John and I went to The Clinic. This afternoon I've been working on a "Pubs near this one" feature for Pubzilla, but being hungover I had difficulty remembering my basic trigonometry and ended up surfing Wikipedia for a while and discovering things like the Sinc function.


Whitelee Forest

This evening I went on my 2nd off-road cycle run this week. I drove to the bottom of Corse Hill, south of Eaglesham, and cycled up. It's a change in altitude of 126 metres over about 4km. I think it might be the highest point on the Eaglesham Moor. My original plan was to see if I could cycle from Corse Hill through Whitelee Forest and join the road that links East Kilbride to Darvel. I would have been relying on a track that doesn't appear on the Ordnance Survey map, but I noticed that Google's Satellite photo shows a gap between the trees so it was worth a look. As it turns out, the track does look passable by bike. I got just over half way through the uncharted track before it got too cold and started getting dark. The decent on the way back was fun! I took photos at various points including some of a radar dome on top of Corse Hill.


Back to Mountain Biking

Yesterday I left work early with the bike and went out on the back road from East Kilbride towards Darvel, and stopped off at a small carpark with a forrestry commision sign. I cycled almost all of the way down the track and back, a total of about 4km. That's my 1st time off-road since I injured my leg. Cycling for an hour does hurt my leg, and this off-road stuff's going to take a bit of getting used to again. I'm intending going out again on Thursday and Friday, hopefully getting further. Checking the map today, I could take a slightly different path and do a 4km loop. Perhaps doing it twice by the end of the week. Michelle pointed out that all this is of course far too healthy so we went to the pub as soon as I was home and changed.


iTunes 5

iTunes 5 is out, go and download it from Apple if you have Windows or OS X. It looks kind of squareish compared to the 4.x series: screenshot. The iPod Nano, and the Motorola ROKR mobile phone have also been released. ROKR is the first mobile phone with iTunes support. It's available on Cingular in the US and I'm not sure about the UK details yet as the site doesn't seem to be fully updated. On MacOS X, it has introduced yet another GUI style - like the brushed metal one, but smooth. GUI inconsistencies are one of the things that annoyed my about Windows when I used it, and Apple seem to be getting just as bad. It does looks more like I suppose, with the smooth look and utilising the full horizontal width of the window instead of have a huge space-wasting border. Functionally, I've not noticed anything different yet, and OGG Vorbis is still not officially supported.


Debian Package N00b

apt-get install dpkg-dev patch dh-make debhelper devscripts gnupg lintian diffstat I'm now ready to make my first Debian package. I've spent most of this morning/afternoon reading up on Debian and Ximian development mailing lists. Unfortunately tonight I also found some more problems with Mono on Debian/SPARC after running 'make check', so I don't have anything of interest yet.


Debian SPARC, Java and C#

Yesterday I began looking at technologies to use for a new project at work. I've narrowed my preference of programming language down to Java or C#, based on the systems the software will need to run on and what it needs to do. As a bit of a challenge, I thought I'd start off by getting the necessary tools installed on my Debian SPARC workstation. After much messing around with Jikes and the GNU Java compiler, I ended up using Jikes, Kaffe and Jikes-kaffe (a wrapper allowing Jikes to use Kaffe's classpath). On SPARC, Jikes segfaults unless Jikes-kaffe is installed, although Jikes-kaffe is not a dependancy. Today I started looking at the C# approach. I installed Mono on Mac OS X and wrote my first multithreaded C# application using my favourite text editor, SubEthaEdit. I've started building Mono from source on Debian SPARC, but pthread support is b0rked, so I'll need to fix that myself - I doubt if many people care about Mono on Debian SPARC. Update 20 mins later... I've got pthread support working in Mono now. Looks like a configure script error causing things not to be defined properly. I'll make a patch for that later once I've found out exactly why it went wrong.


Quarter Century

This weekend was my 25th birthday. I was out for a meal with my family on Friday, followed by seeing a few bands at King Tut's with Neil and Michelle. Satruday involved McPhabb's and The Goat, and Sunday involved the Lansdowne Bar, Bean Scene on Woodlands Road, then ending up at Otago for dinner with Edward and Neil's family. By that time, I couldn't handle any more going out and had to go home shortly after Edward. I've also been messing around with Sun Ultra 5s and now have Debian running on one as a desktop with NIS and NFS set up.


Injury, Concentration and Sextants

I'm halfway through recovering from an injury to my left thigh which resulted in having a large haemotoma removed, spending several days in hospital and requiring to be on crutches for a few weeks. My attention span hasn't been great over the last two weeks (probably as a result of lack of sleep) so I've not been up to anything interesting. Photos of the incision and the wound are available. Today I thought I'd play around with JSP, but so far haven't figured out what to download. The debian box that runs my web server had run out of disk space which didn't help either. I bought a sextant today. It's an ornimantal one which probably doesn't work very accurately, but looks interesting. I spent yesterday playing Sim City 2000... Oh, the memories!



Friday was Stephen's last day at work and we had a good 7-a-side game of football at lunch time. photos of it are on his blog and here. In an attempt to have a cheap weekend at home, I spent a lot of time walking around Glasgow taking notes for a website I'm putting together. I'm building up a database of coordinates and photos. Part of the site will have a map to show the locations of places. I've gone down the Google route with this, and the map can be moved by dragging it around. I was having a look at Google's UK maps this afternoon and can now identify 4 street names that are wrong:
  1. "La Belle Allee" should be "La Belle Place"
  2. "Duff Street" should be "Lynedoch Street"
  3. "Dal Nan Each" should be "Woodlands Road"
  4. "Inverquhomery Road" should be "Great Western Road"
I'm off to start tidying my room to make packing easier. I've not found a new flat, but will be viewing some this week.


apt-get update

It's been too long since I wrote anything here. I'll start with this weekend...
Friday: Dad's bithday - went to Elliot's on Bath Street for food. The food was amazing, and the live music was good too.
Saturday: Vikki's birthday night out. Vikki, some friends, Neil_ and I went to Arta for dinner, and stayed late for drinks too. This was my second day in a row of eating mussels in a restaurant... yumm!
Sunday: Went with my family to a garden party just outside Perth for my dad's cousin's silver wedding anniversary. I probably recognised less than 10% of the people who were there. It was a good day though, and draught beer on tap in your house is always a good thing ;-)
I'm now attempting to have a quiet week in. Tonight I'm dist-upgrading a debian server (to the newly stable Sarge). This box will be used for hosting while I'm moving to a new flat. I was quite surprised to find that the version of PHP on MacOS X Tiger has no image manipulation support, so I'm currently installing MySQL on a Gentoo box for messing around with a database-driven website with dynamically generated images.
And now the biggest news for me this week (aprt from Sarge going stable) is: Apple to Use Intel Microprocessors


Long Weekend

Thursday: ScotLUG with Big Kev's VoIP talk, followed by the Cathouse Friday: off work for Cat's birthday day/night out where Cat, Vikki, Neil and me went to see H2G2, which I can safely say was the best film I've ever seen in the cinema. It followed the book well and was hilarious. Scott and me managed to get back into Rufus in the evening, then we met back up with the others at a private party in the Library, before moving on to the Garage. Saturday: Gary and Angela's wedding. It was in the afternoon thankfully, so I was wide awake by that time. Despite what the forecast said, it was a lovely day. Wedding and reception both went really well and we all had a great time. I took some photos at the ceremony and the reception. The photos that Graeme took are also online.


Kubuntu at Work

To get video working at the correct resolution with the i810 chipset and an HP1902 monitor, I used this xorg.conf file. To install NIS, I did this:
  sudo apt-get install portmap nis
In /etc/nsswitch.conf, I changed this:
passwd:         compat
group:          compat
shadow:         compat
to this:
passwd:         files nis
group:          files nis
shadow:         files nis
added this to /etc/yp.conf:
domain domainname server servername
and restarted NIS. Finally, to allow me to log in as normal, I had to install zsh, nfs-common, and autofs.


Quiet Weekend

Saturday involved breakfast at Ikea with ScottMac followed by lots of MTV and coffee. Sunday involved putting Kubuntu onto the laptop. A Debian-based operating system that's aimed at KDE users. Nice!


Paisley Beer Festival

A collection of photos from ScotLug at Paisley BeerFest 2005... MrLithic's Photos ScottMac's Photos JaavaaGuru's Photos


Stag Weekend

That was a totally amazing weekend: Gary's stag night in Edinburgh. Starting off at a pool hall on Morrison Street, followed by food at The Great Wall on Lothian Road, then I think the next place we went to was Finnegan's Wake - and excellent sauna just up from Grassmarket. Some of us made it as far as Subway after that... we seemed to get knocked back from elsewhere due to the size of our group which was a bit annoying. Finnegan's wake is actually an Irish themed pub, but it was roasting inside! Followed last night by Kenny's birthday night out in Glasgow, starting off in Elliot's and finishing up in The Garage. Methinks it's time to avoid nights out for a while! updates... I must appologise for the outage from approximately 2pm yesterday until 3am this morning. Someone (unsure who since we had people staying over last night) had turned off my router (again). Today I'm going to move the router to another location, out of the way of fiddling fingers. At the moment, is hosted with a friend in Edinburgh, but within a week or so it will be moved into the same rack as www, and a few other sites that were co-hosted on the same box will also be moved here. Lets see how well the bandwidth stands up to it :-)


A few updates...

I've added a couple of new desktop screenshots to my website. There's someone new leeching the same large JPEG image from again. I'll need to think up something more subtle to do to the image this time! Also, had a page of photos from the school. It seems to have been taken down now, but it's mirrored here on now. Does anyone know where these pictures came from? We all know that the real Loudoun Academy website is here though ;-) My new toy this week is Konfabulator (which you can see on my screenshots page). It lets you add useful little "widgets" to your desktop on Microsoft Windows or Apple OSX. It's similar to Karamba on KDE. Being able to import widgets between Karamba and Konfabulator would be nice. Have you got a spare computer? I'm looking for a cheap (and quiet) second hand computer to use as a router between my network and GlasgowNet and BackNet. If anyone has a spare that they're willing to sell (something like a Pentium 166 is more than adequate), then please post in the guestbook. I discovered that Sara and Aaron have a blog: then I discovered a photo of Tina and me on it among lots of other good pics.



I found this in my notes today at work. It is a simple way to get a list of people who have edited a file in a CVS repository: cvs log | grep author | awk '{print $5}' | sort -u We use CVS a lot at work. I've started playing around with Subversion at home, but have found that the database needs rebuilt sometimes, which I don't like the feeling off. I'm worried that the corruption that happens sometimes could lead to data loss. Reminds me too much of Source Safe :-(


Uneventful Day #1

Today I read that SHA-1 encryption has been broken. I also figured out that half the reason I thought one of my routers was broken was actually an error in the routing table in the Sun server. It seems to lose it's default route if I restart it. It took ages for me to find that since it hardly ever gets restarted. Other than that, I titied up my desk at work. Woohoo! Oh, and I've noticed that's editor doesn't work well in Safari. It's ability to do fonts, links, etc isn't there.



A couple of people have web pages where the background image is a large JPEG being leeched from's server. I've changed some things so that anyone who views one of the leeching sites sees a photo of Celine Dion instead of the original image. Since it's a "hardcore" rock band page, I'm sure they'll be pleased. They might even copy the image to their own server instead of using my bandwidth! For anyone viewing the image directly, it appears just as it used to. I've also set it up so that if the browser's IP address is that which I believe to belong to the owner of the web page (or maybe his/her ISP), then the original web page is returned. I wonder how long it'll be before they find out. To accomplish this, I added this .htaccess file to the directory containing the image: <Files blood.jpg> AddType application/x-httpd-php .jpg </Files> This causes PHP to interpret this file before sending it to the client browser. blood.jpg is actually a PHP script now, and you can find it's source here: I've been told there's a discussion about this at's Forums.


Dynamic virtual hosting with proxying

If you read the Apache documentation, dynamic virtual hosting is simple, and having Apache act as a gateway or proxy to other servers is straightforward too. Dynamic virtual hosting is useful if you want to have lots of websites hosted on one machine - it allows you to create a rule that generates a document root based on the domain name ni the URL. Now, if you want to set up a machine so that it acts as a gateway to some machines, and everything else is a dynamic virtual host, that's more complicated. I figured out how to do it and here's what I added to my apache.conf: NameVirtualHost *:80 <VirtualHost *:80> UseCanonicalName Off <Directory /> Options FollowSymLinks ExecCGI Multiviews Includes AllowOverride All </Directory> VirtualDocumentRoot /export/home/websites/%0/web </VirtualHost> That sets up the default virtual host which will deal with the dynamic virtual hosting using a VirtualDocumentRoot. The %0 in the document root is replaced by the domain name used in the HTTP request. For example goes to /export/home/websites/ <VirtualHost *:80> ServerName ProxyPass / </VirtualHost> The above section of the apache.conf file sets up proxying for one particular domain name to another machine on the same network as my Apache server. All requests for are passed onto for processing.


Routing and Apache Gateways

I switched my broken Linksys router from NAT Gateway to Router and back again, and now I can connect through it to machines on my subnet. Hmmm... Maybe I won't need to replace it after all. Now to blog how I set up routing to my Apache servers with private IP addresses on that subnet... I have a machine ( with a public IP address ( running an Apache server. This machine acts as a gateway to the other servers. I have a NAT Gateway ( on the same subnet as the Apache gateway server which has got various ports set up to forward to port 80 on each web server on the private network. Setting this up depends on which router you use. If the Apache gateway machine is running Linux (or any other Unix-like system), you could make it do the routing to the private network too. The Apache gateway server has had entries like this added to its apache2.conf file: <VirtualHost *:80> ServerName ProxyPass / </VirtualHost> And make sure these lines aren't commented out: LoadModule proxy_module modules/ LoadModule proxy_connect_module modules/ LoadModule proxy_http_module modules/ And finally, I have DNS set up so that a host name points at the Apache gateway server for each machine behind the NAT gateway. The host has IP address, and points at (the gateway server). The above virtual host directive in the Apache config tells apache to redirect requests with this hostname to port 84 on the NAT router. The NAT router then forwards the request to where a web server will server up a web page. A side-effect of this setup is that Netcraft now things the server's OS is Linux and it's running Apache on Darwin. I'm sure some fun could be had with this type of setup with a Microsoft/IIS host behind the gateway.



Did you know that the fastest web searches in the world are done by pigeons? Neither did I until I came across that page on Google. While on the subjects of pigeons in computing, Stephen sent me this link to a web page describing an actual implementation of RFC1149.

Atoms et cetera

Today I've integrated a new blog with an Atom feed into the site. I've made use of atom2rss to get an RSS feed which can be integrated with Firefox's Bookmarks. I'll be re-arranging things later so that it fits in better. I've also noticed in the referrer logs that we get a surprisingly high google ranking for DiMaggio's Glasgow. If you've got your bookmarks stored in, then will tell you which users have the most bookmarks in common with you. Oh, and my phrase of the week is "royally b0rked". Google shows results 1 - 4 of about 58, so it's not too common. It describes Konqueror on my laptop which won't connect to any sftp hosts, although ssh and scp both work fine. Oh, and it describes one of my routers which refuses all connections originating from outside its subnet. What a truly useful router that is!


Slightly different weekend. No going out to pubs for a start. Spent most of Saturday afternoon walking around Glasgow, then went to see a play in the evening with Tina. It was excellent! Spent most of Sunday playing around with the website, and looking at what some previous versions of had, like the blog. Still trying to get OSX to mount WebDAV shares from my web server, without any progress at all.