Stavros' Stuff

On programming and other things.

Running Windows 7 in a VM.

These past few days I have been trying (unsuccessfully) to get Windows 7 to run in a virtual machine. My OS is Ubuntu and I need Windows for some things (mainly iTunes), so I decided to virtualise my physical partition so I wouldn’t have to reboot.

After following various guides trying to get VirtualBox to read directly from my physical partition, I had luck with the following command:

~~~bash V

Continue reading…

SSL and security on the web.

Introduction to SSL

So, say you want to buy a book on Amazon. You go on the website, pick the book you want, add it to your cart and proceed to check out. While checking out, Amazon asks you for your credit card information, you enter it and they tell you your item will be shipped soon.

You really really want to be sure that only Amazon got your data, though, because you t

Continue reading…

On mate selection

In the last few days, I get an increasing number of people coming up to me in the street and saying “But Stavros, how will I know if I have found the perfect man/woman/cyborg for me?”.

Worry not, gentle reader, for our science department is here to give you the answer to that question.

Imagine for a moment that, on a night out at the bar, you meet a girl/guy. You feel like you’ve never felt befo

Continue reading…

How to synchronise folders between iPhones or iPods (or any two SSH hosts).

I have an iPhone and iPod touch and recently bought Plants vs Zombies (again, I already finished the game on the PC) on both devices because I use them interchangeably and it’s just that good. A problem did quickly crop up, though, and the problem was “How can I quickly copy the game data from one device to the other?” I don’t want one device to be behind the other.

Initially, I tried to get AppB

Continue reading…

SSH key creation howto.

After googling around a bit for a tutorial for a friend and failing to find a sufficiently succinct one, I decided to write my checklist here so I don’t forget. If you want to do passwordless authentication to an SSH server using SSH keys, these are the steps you should follow:

Continue reading…

How easyjet screws you over.

A month or so ago, my girlfriend decided to come see me, so I booked her a ticket online. We decided to go with easyjet as they were quite a bit cheaper, paid the 240 euros and were happy about it.

Cue next month, the day comes, my girlfriend goes to the airport all excited about coming over and easyjet tells her that her name is not the same as the first name listed in her ID card. I had used he

Continue reading…

Forwarding ports on Linux.

After spending the better part of an hour trying to forward a port in Linux using iptables, here’s what you should do and what you should remember not to do.

This technique should work on any distro that has iptables, such as Ubuntu, Debian, Fedora, Red Hat, RHEL, Gentoo, etc. Here it is:

As a first step, enter the following rules in your iptables:

Continue reading…