I stopped working on pyBackPack a long time ago. The final year of my degree didn't leave a lot of spare time for hacking on the code, and it fell by the wayside.
Now, however, my good friend Andy Price has picked up the torch, and is going to continue pyBackPack's development. He's taken ownership of the code, and I've detached myself from it officially. Andy's created a project page, and the bug tracker and SVN systems are up and running. I've set up redirects on my website so all old links should be sent to the right places - please let me know if anything doesn't work any more.
Best of luck to Andy!
While working on a forthcoming project (watch this space...), I decided it'd be a lot easier to test the code on my local machine rather than SUCS's server.
Tiger (yes, I'm a Mac user these days) comes with Apache 1.3, which is rather outdated, so I looked into updating to a more recent release. Fink has Apache 2.0, but I decided to go all-out and try and get Apache 2.2 running. It turned out to be relatively easy.
Here's my setup:
- OS X 10.4.7 on an Apple MacBook
- XCode 2.3
- Python 2.4.3 from python.org
First of all, we need to get Apache compiled and installed.
$ wget http://www.mirror.ac.uk/mirror/ftp.apache.org/httpd/httpd-2.2.3.tar.gzThat should install Apache into
$ tar zxf httpd-2.2.3.tar.gz
$ cd httpd-2.2.3
$ ./configure --with-mpm=worker --enable-so
$ make
$ sudo make install
/usr/local/apache2.Next, download and compile mod_python:
That'll build mod_python and put the appropriate files in
$ wget http://www.mirrorservice.org/sites/ftp.apache.org/httpd/modpython/mod_python-3.2.10.tgz
$ tar zxf mod_python-3.2.10.tgz
$ cd mod_python-3.2.10
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/bin/python
$ make
$ sudo make install
/usr/local/apache2/modules.Configuring our newly-compiled Apache to replace OS X's default one is easy enough - a few changes to /usr/local/apache2/conf/httpd.conf and extra/httpd-userdir.conf is all it takes. Download an archive with all the necessary patch files here. Note - these configuration changes don't cause Apache 2 to behave exactly like Tiger's Apache 1.3, and there may be parts I've overlooked that could be exploited.
To apply the patches, run the following as root (from the directory with the extracted contents of the archive):
# patch /usr/local/apache2/conf/httpd.conf httpd.conf.patch
# cp httpd-userdir.conf /usr/local/apache2/conf/extra/.
By now, you should have a working Apache 2 setup on your Mac, but how can we make it start at boot? This is relatively easy - we can use /Library/StartupItems to accomplish this. The zip file contains the files you need to put in this directory to automate Apache's startup.
Unzip the archive and then cp -r Apache2 /Library/StartupItems/. as root.
That's it! To get the server started, you can run sudo /sbin/SystemStarter start "Web Server" and then browse to http://localhost/ to test your new Apache installation! And then, of course, you can dive into the world of Python.
pyClick is a pseudo-driver for the Griffin AirClick USB for Linux. It's written in Python, and provides a mapping between keys on the AirClick remote and running user-configurable commands on the PC. By default, it is set up to control a media player such as Rhythmbox or Banshee by simulating X keypresses.
Get it now!
Realising that my desktop PC has its music shared (using Samba) with the rest of the home LAN, I set about trying to connect to it from my laptop on the University's VPN.
On Windows, the process is as follows:
- Execute
net stop serverfrom the command prompt (Win+R>cmd>OK). This stops Windows' Samba server on the local machine (we're effectively replacing the local server with the remote one). - Open PuTTY and select the 'Tunnels' option from the 'SSH' menu in the left-hand pane
- For each of the following port numbers:
137, 138, 139, 445; enter the port number in the 'Source port' entry box andhostname:X(wherehostnameis the name of the box with the Samba shares, andXis the same port number you put in the 'Source port' box) in the 'Destination' entry box, and then click the 'Add' button. - Return to the 'Session' option at the top of the left hand pane and enter the name of the remote host you're connecting to (in general, the hostname of the internet gateway on the home LAN).
- It's probably a good idea to save this little setup for future use, so give it a name in the 'Saved Sessions' box and hit 'Save'.
- Click the 'Open' button, and enter your username and password when prompted (assuming you don't have SSH keys set up...)
- You should now be able to enter
\\127.0.0.1in the Windows 'Run' box, and after authenticating with a valid Samba username and password you'll be presented with all the visible shares of the remote machine. These can be browsed and mapped to network drives, as with any Samba share. - That's it!
Of course, this makes several assumptions - you need to have a machine on the home LAN you can SSH into, for one. But it's a simple hack that seems to work. It's also got the added benefit of being encrypted.
Something like Icecast would probably be a more sensible long-term solution, but for a quick and easy way of listening to your tracks, it does the job nicely. :)
I've become something of a man of leisure since my return from the holiday. It's rather nice to not have to worry about deadlines, going to work and other such things. I should be a slacker more often :)
I've been able to indulge in some pet projects - the current focus of attention is an AJAX webmail client. At the moment I'm doing it the hard (easy?) way - Python CGI. No doubt this isn't the most efficient or sensible way of doing it, but it's a scratch for an itch. Redeveloping the system using a framework like Django or mod_python (ok, not a framework per se) would probably be a simple task because there's not a lot of code written yet.
minus-zero.org finally has some kind of coherent design and content, although there's not an awful lot to see yet. The pages are static HTML, generated from a template by a simple script. This could be interesting when the site expands, we'll see.
In other news, I'm heading back to Swansea on Sunday. The Great Job Hunt will then begin, as I attempt to find some form of income to offset the new house's huge rent costs. Hopefully having my CV (which I've yet to write...) bolstered by having 'Google paid me money!' splashed across it will help. Though having said that, I doubt if the average shopkeeper gives a monkey's. :)
After much grumbling and discussion about the subject for a while, the SUCS team (led by chckens) finally got around to setting up Planet SUCS. It should give members more of an idea of how much work we do for them (ahaha!). The new SUCS game server is also live, albeit it on a limited campus-only basis for the time being. We’ve got in contact with the LAN Society to help publicise it and hopefully we’ll end up co-operating with them on events in the future. Setting up the server was a lot smoother than I’d anticipated, but I hope LIS see sense and let us open it up for off-campus members to use. It totally sucks that I spent ages setting the thing up and now can’t actually use it. In other news, I sorted out my choices for the 3rd year project. I’m looking forward to it immensely as it’ll be a good opportunity to do something creative. Doing set coursework is OK for so long, then they get boring and restrictive. The project counts towards 25% of next year’s marks which is quite a hefty amount, I hope I snap out of my recent trend of leaving work until the day before (or even after) the deadline. The choice of projects on offer was mind boggling, I narrowed it down to the maximum of 7 though (in order of preference):
- A web log system (AG-7): This was something I suggested to the ever helpful Gimbo and he seemed happy enough to take me on, w00t!
- A web log client (AG-6): Related to the above, but a prescribed project rather than something I’d thought of. Could be fun - the brief is to create a blog client that can talk XML-RPC to upload entries to a blog. Funnily enough, I’m posting this entry with a client that does just that.
- Rich music meta data system (MJ-2): The purpose of which is to find and exploit links between a user’s listening habits in different situations/activities/locations. What’s slightly odd is that I had an almost identical idea about a year ago, but never got around to implementing it in anywhere near the depth this project requires.
- Tamagotchi e-mail (MJ-4): This one could be seriously fun - create an e-mail client where each message is its own distinct entity with ‘health’ that changes depending on several factors, such as who it’s from, when it needs to be replied to, etc. It’s an exciting prospect, and I think if it was done properly, it could become a massive part of how we interact with each other using e-mail.
- Real time CSS Editor (NAH-6): Not so revolutionary as the above projects, but quite nifty nonetheless. My vision of this would be a two-paned window that updates the HTML display in one half while you create/tweak the CSS in the other. Would certainly speed up web design.
- Web Server Log Analyser (IR-11): This one involves working closely with a local company to generate statistics on their web traffic. Might not sound all that exciting, but there’s a small part of me that’s nutty about statistics - I often write logging code into things I create even if I then completely neglect the possibilities they present.
- Online Source Code Version Control (NAH-4): Basically a CVS/SVN type affair. I touched upon something like this with some code I wrote for the group project, so it would be fun to implement it more fully. Although after I’d handed the sheet in, it was pointed out to me that ‘Web Services’ probably meant .NET Web Services. Ugh.
On Sunday, in the car on the way to Cardiff with Jen’s mother Ruth, we had a conversation which went something like:
*rain hammers down outside the car*
Ruth: Dave, it’s pouring with rain outside, do you have a Mac?
Dave: *after wondering how the two were related for a few moments* Erm, no , but I’d really like one. They’re quite expensive though!
Ruth: Well you’ll get soaked! Don’t you have a coat at all?
Dave: Oh! You meant a mac as in a rain coat! I thought you mean an Apple Mac computer!
Ruth: You’ve got a one track mind!
Needless to say I was left feeling slightly bewildered and embarrassed, but it obviously didn’t have enough of an effect on me to prevent the same thing happening today:
(in a Jabber conversation)
Jen: Do you have a mac?
Dave: No, but I’d love to have one. I’m actually using one on campus now, funny you should ask.
Jen: hahaha, mum told me about the conversation you had in the car the other day! You’ve got a one track mind!
So, yes. Evidently my obsession with all things Apple has taken ahold of me more than I had previously realised.
