So, I’ve been using MythTV recently. I have my master backend upstairs, with all of the storage. And then downstairs is the slave backend with the three tuner cards. Soon after setting all of this up, I found that I was going to run out of disk space for recordings pretty quickly.
Therefore, I bought three 750GB hard disks to complement the one 750GB disk that I had already. And I decided to get a bit of RAID 5 set up. I didn’t trust the fake raid card in my server box, or even believe it was supported in Ubuntu. So I had a look into software RAID. It looked pretty good, so that’s what’s setting up now.
I was a bit shocked to see the packaging Scan.co.uk sent the hard disks in, as you can see. There is also a hard drive mounting kit for a optical drive bay in there as well. Luckily, nothing seems damaged, so let’s hope it stays that way!
And this is the process I am following to get all of this organised and set up…
Connect up all the new hard disks
Format the new disks and set the RAID flag
Create a new blank RAID array with the three disks
Transfer all the old data onto the array
Change the /var/nas mount point to the new array
Format the old disk
Add the old disk to the array and expand the array
Expand the file system
It’s taking time, but it’s coming along. I’m at step #7, and it looks like it’s going to take a while. It’s at 3.9% and has an estimated time of 869 minutes left. Should give me a chance to do something useful.
Noticed anything different about the blog? I hope not, as I’ve made a smooth transition to using my own VPS provided by Bitfolk. Yay! But that’s the topic of another blog post!
I’ve made a little app, with Python. This app opens up GPX trace files and allows you to view them on a map, and view basic stats. For those who don’t know, GPX files, are tracks recorded by a GPS device. Making tracks with a GPS device lets you review your journey later.
As you can see, and can possibly recognise, the trace is drawn on an openstreetmap map. This was made possible thanks to John Stower’s brilliant openstreetmap GTK widget with Python bindings. (I’ve packaged this GTK widget up for Ubuntu and it was accepted in. That was my first packaging, which I will talk about in a future blog entry!)
I’m going to work on Ubuntu and Debian Packages very shortly, so it’s easy to install. Are you a packager for another distribution? Would appreciate it if you’d package this up for me. It would be great if you let me know if you are going to do this.
Translations. This program is fully translatable on Launchpad at http://translations.launchpad.net/gpxviewer - Go ahead and check it out, if you know another lanuage and want to help out! Shouldn’t take too much effort, as there’re few strings to be translated at the moment!
Leave a comment to let me know what you think of the application.
Woke up this morning. Snow outside. Listened to local radio station for school closures. Practically every school read out, apart from mine. Head to school at 8. Get sent home. As getting back, the school finally is read out on the radio :p
At about 9AM, I decided to set up my Nokia N95 propped up pointing out of my window looking at the drive and road. I used the time lapse function of the camera application, to capture a picture every 30 seconds (later changed to 10 seconds). This ran from 9AM til it got dark, so you can see the snow melt away, and then slightly come back towards the evening.
Once I downloaded all the pictures, I made a quick batch script to re size the images to 640×480 and rename them into a nice sequential set of file names. I then fed all of these into a ffmpeg command I carefully constructed:
Now it looks as though I’ll probably be going into school tomorrow, even though I’m supposed to be going to a University Interview at Southampton. Probably not the best idea to drive there!
Coming Up
So I haven’t blogged for a while. I have some stuff I can blog about though, which I’ll get around to. First, I made a package for Ubuntu and it’s been approved! It’s a GTK widget that lets developers embed openstreetmap in applications - With Python Bindings!
Another thing to blog about is the application I’m creating with the packaged GTK widget, which lets users analyse GPX traces.
Fingers crossed for more snow! Bye!
Edit: Made the Echo website!! http://www.bournemouthecho.co.uk/news/4096055.FRESH_SNOW_AND_ICE_THIS_MORNING_ACROSS_DORSET/
In my last post, I was talking about how I had made a nice little radio automation app in python. Since then I’ve completely restructured it and it is now split into a frontend and backend, which communicate with XML-RPC (yay for the xmlrpclib module). But the website to go with this project is not that great. The other day I went back to look at the website so far, which I had originally written in PHP. I got annoyed with how disorganised it was and decided to rewrite it in django. Oh. And I just prefer python coding over PHP now
I’ve been trying to learn django on and off for ages now. I usually lose concentration after the first two parts of the tutorial. But this time I had a purpose - the website. I’ve found the best way, for me to learn a new language, is to take a tutorial telling me how to make another project, but apply it to my own project. So I installed the SVN version of django and I’ve zoomed through a lot of django learning now. It’s great. It’s all nicely arranged and modular, which is something I’m liking more and more as my programming skills have developed and perhaps lazyness, when re-using code
I’ve also been using subversion to keep the code organised. I would have used bazaar if there had been a webdav plugin that worked with the current version I have. I suppose I’ll have to wait for intrepid for that then. subversion is serving me well though. I just got to get the person that’s supposed to be helping me to actually help me. Yes, that’s right - I’m looking at you Stephen.
Within the past year, my school has started to become very involved in trying to start it’s own radio station. We’ve had a large amount of money put into it and it’s slowly growing. We have the software that all the professionals use, and all of the equipment too.
But now I’m moving on to developing an automation application for the time that there isn’t a show on air. This will be similar to Southampton University’s radio station automation system (http://surgeradio.co.uk).
I’m using a combination of python and gstreamer. The feedback so far from the teacher involved, with our radio station, is good. The only problem is the network technician that is a Windows Server user. I think I’m going to have a problem, when I ask for a linux server to host the automation server, streaming, file server, and website. I expect he’ll wonder what’s wrong with his little sharepoint setup, he has going. Hopefully I might be able to do some persuading to get past that, but it’s not going to be easy. I understand the problem that this would cause though. I’m the only one with the skills to maintain the linux server. When I leave next year, I doubt they will have a clue how to operate the server, as I don’t think they have no knowledge of Linux. Anyway, that’ll be fun to try and sort out. Any suggestions?
At the application side, it’s coming along well. I’ve made a website that will allow listeners to request songs to be played. These requests are popped into a MySQL database. From here, my python app checks for new requests after every song. If there is a request, it’ll play that. If not, it’ll choose the next song from a pre chosen list. Nifty, aye?
I was amazed at how quick it was to develop in python, as this is my first real programming project in python. It was so simple to get a basic set up done. I had it done within a night! Jono Bacon’s excellent guide on gstreamer in python helped me well. The app now also has a nice little GUI, made in glade, that’ll help the DJs turn the automation on and off.
For the hardware setup, I’m looking to get the server, that I mentioned, and a few high quality sound cards, that’ll provide balanced audio in and out. I don’t think we’d need much processing power for the encoding of the streaming, as I’ve done a few test runs with my old Pentium 4 clocked at 1.8GHz.
All I have to do is finish it all up now… And perhaps do some of my many pieces of homework!
It’s taken me a few days to blog about this, but here it is… I haven’t blogged in a while now. I’ve finally got around to it.
So Wednesday. An average sort of day, you’d guess. Well, not quite.
Arriving at school, we noticed a large group of people walking around with the head teacher. Entering tutor time we were told that “someone important” was visiting our school today, and there would be camera crews around. Went to the first lesson of double maths. Room change. Fine…
Got to the new room and were told by our maths teacher that there were going to be three people coming to our maths lesson. These three people, announced in this order, were:
Minister for women Harriet Harman
Education secretary Ed Balls
And finally, the Prime Minister
Ok then. Sounds like fun! So we continued on with our maths lesson. Quadratics in simultaneous equations. What fun! We even got a presentation on the computer (that’s my maths teacher trying to show off, I expect). During our lesson camera crews and photographers slowly trickled in to the maths room standing at the back. They were even taking pictures, though no one had turned up yet. What’s all that about?
5 minutes later the door opened and out popped Gordon Brown (followed by the other two of course!). Everyone stared at him amazed that it was actually him. He asked a few questions, such as “Is maths your favourite subject?” and “What do you want to do, when you’re older?”. That must’ve been the quietest my class has ever been. After a while, they began to start talking to him, although it was still quiet. He went to go and talk to people individually while the other two came around too. Harriet Harman came and had a look at my maths book, looked confused, and said she was “crap at maths”.
About 15 minutes passed and they were all pulled out again to move on. Once they left, we discussed what we thought of our prime minister. I thought he looked different to how we see him on the TV. He was older and larger (my maths teacher used the term “cuddlier”) than how he seems on Television.
Ok that’s over… Back to maths! What a lot of homework we get…
After watching recentSystmepisodes, I decided that I would try and get into electronics. The most specific part that I decided I wanted to get into was the AVR programming. But before I get to that, I decided that it would be a good idea to learn how to solder first!
Off I went to a Maplin store. You walk into maplin and you are instantly greeted with millions of electronic things, of which I didn’t know what they were. Walking around there, for a while, I discovered some electronic kits. These “make your own” kits are manufactured by Velleman, and I can recommend them.
So after browsing through the many different kits, I ended up choosing a Clap activated switch. Whilst I was there, I grabbed a soldering iron stand, as I already had the soldering iron + solder.
Opening the kit presented me with millions (ok, 20) resistors, and a bunch of other electronic parts. Two days later, and the solder sucker having to be used occasionally, the kit was finished. One thing I forgot to purchase was a transformer to plug it in with. After visiting maplin I came home and found the transformer was faulty. It is one of those changeable voltage transformers. This one, however, would only work when set to 6 volts. After getting a replacement, finding that it was faulty too, buying a different one instead, I finally got the clap switch to work.
And am I surprised that it worked first time? Well… Yes!
First off, I realise that I haven’t posted a blog entry in a while now. I don’t know why I haven’t, as I’ve had plenty of time, it being the summer holidays and all. I always find my self wanting to do so much stuff in the summer holidays, and somehow turn up doing hardly anything. ‘Tis a shame.
Anyway…
After reading this mailing list post on ubuntu-uk, I was surprised these 3G datacards actually worked under ubuntu. Therefore, I instantly zoomed off to ebay and purchased one for £34 + postage. I made sure it said unlocked in the ebay listing, as I currently have a virgin mobile sim card and didn’t want to waste/switch to vodafone.
So the datacard turned up and I popped my phone SIM in it. Following the guide that was written in the mailing list, I configured it. This was using kppp. So I made everything was in there right and tried to connect. One problem though. Everytime I tried to connect kppp would lock up instantly. “Ah dear”, I though.
After much researching, I managed to set up the datacard using gnome-ppp, which is equally, if not more, easier to set up the datacard in. And here is a little guide I’ll write in full for you…
So I’ve been on a little fun into setting up a webserver. Using an old computer which uses a shuttle case + motherboard. This case and motherboard has been through a lot. Stuff taken in and out loads.
And the fan failing. That was fun. It kept overheating and after much playing around, we found that the fan on the cpu heatsink had died. Shuttle being nice and kind when they designed this heatsink, made a size fan that you can’t get anywhere. Instead, I got a generic case fan and duct taped it to the heatsink! Clever, eh?
So my server. What is it serving? Well, it’s backup server. Thanks to the backuppc package, all the computers will be backed up in my house. Every week a full backup is done. Followed up by a incremental backup each day. Backuppc is also very clever. If there are files that are the same across backups and computers, the file will only be stored once. I can’t backup my whole house yet though. This is because of the hard drive in the server. It’s only a 120GB one. That means I’m currently only backing up one computer as a test.
What else is my server serving? SSH. The first thing I did when I set up the server was install SSH. This is for two reasons. The server is now on top of a shelf somewhere else in the house with only power and an ethernet cable attached. SSH is my means of remote access. The other reason is so I can have a nice SSH tunnel when I go to sixthform in September. No more annoying school filters to me Another part of my SSH server is a key based authentication. I decided that I didn’t really want to put my server out on the internet, if someone was able to bruteforce the password. Therefore, I have set up key based authentication and completely turned off Password authentication.
Quotas. I also managed to set these up. Just as a play around really. It was pretty simple to do:
sudo apt-get install quota
Open up fstab and pop in the usrquota option to the partitions that need to be quotaised
Restart
sudo edquota -u username
The quota config for that user will show up. Under the blocks and inodes column, you are able to see what the current use of that user is.
You are then able to edit the number of blocks (1,000 blocks = about 1MB) that the user can make under the first hard and soft columns.
The second quotaing is the number of files which can be set under the second hard and soft columns
Save and quit. You’re set!
What’s the difference between hard and soft quotaing you ask? From what I’ve read around the internet, a soft quota is one that limits the user slightly. The user is allowed to go over the soft quota. But only for a limited time, before they have to delete the files. The hard quota is a strict quota. You hit that quota, and that’s it. Delete the file or be able to do nothing!
And of course, to do my bit, my server is folding proteins. Slowly but surely…
Still my early summer holidays. Apart from the many household jobs my parents have instructed me to do, I’ve also be learning a new programming language.
I’ve be learning the great web development language known as ruby on rails. I’m not quite a 1337 h4xx0r at it yet, but hopefully one day! Or perhaps not. I’m not a 1337 h4xx0r at php and javascript and I’ve been using them for quite a while now.
Advantages?
I think this ruby on rails magic makes all this web development lark much easier because of the following things I’ve found so far:
Firstly, the “Model, View, Controller” way of running things. Ok. So this wasn’t easy to understand straight away. But as soon as it goes *click* in your head, it sure is amazing. I remember half heartedly trying to learn ruby on rails a while back and gave up pretty quickly because of the confusion from this MVC. If you want to learn ruby on rails, I do recommend getting a good book (I’ll talk about that in a minute), and also making lots of examples to remember what all the different components of MVC do.
Number 2 in ruby on rails features has to be Migrations for databases. Migrations allow you to easily synchronise database changes between developers of the web application. You make a change to the database that needs to be synchronised? Well then you setup a database migration step and the changes will be updated when the developer next runs db:migrate. Another good use for database migrations would be to easily manage the database states between the development and the actual deployment on a server. I can’t see PHP doing that with any great ease.
Number 3? Well… I don’t have a number 3! I’ve only got to page 100 so far. Actually 99. But still!
The elite book
Before starting to learn I spent much time trying to find the best book to guide me through learning the language. After browsing through the surprisingly small amount of RoR books on amazon, I found that the best beginners book is one that goes by the name of “Agile Web Development with Rails”. It’s a bit of a mouthful for a book title, but it surely is a great book. It is very well written and easy to understand.
The book takes you through building a project that is an e-commerce site. I find this is the best way to learn a new language and is what I’ve done for almost every other programming language I’ve learnt. I would have preferred for it to be a more useful project, such as a blogging system or something else. But looking at it now, I can see that an e-commerce system probably contains lots of different concepts that you will learn.
I’ve included a direct link to the amazon page for the book on the right, so if you are thinking about buying this book, please follow the link below to help support the running of my blog!