Category: General

How to setup Logitech Harmony One remote with xTreamer Ultra + Win 7 + XBMC

By , February 2, 2012 9:37 pm

I recently got hold of a Logitech Harmony One remote, and promptly set about setting it up for use with my Xtreamer Ultra and XBMC.

There’s an excellent guide on the XBMC forums here about how to set up the Harmony One remote with XBMC, fortunately everything in that guide applies to the Xtreamer Ultra.

I made only one adjustment, which was to alter the XBMC keymap so that when the remote sent an “s” it shutdown the PC (default behaviour is to pop up the shutdown dialog). This means that when you press the power button on your remote, the Xtreamer will actually power off. Incidentally, the Harmony One remote will power on a Xtreamer, just as the supplied Xtreamer remote does.

To setup the keymap, create a file called keymap.xml and put it in %APPDATA%\XBMC\userdata\keymaps\keyboard.xml. The file should contain something like this:

 

<keymap>
<global>
<keyboard>
<s>XBMC.ShutDown()</s>
</keyboard>
</global>
</keymap>

 

Of course, you may have additional custom keymaps in there, the important bit is the line with <s>XBMC.ShutDown()</s> on it.

There’s more information one modifying the keymap.xml file here.

Look what I found…

By , October 15, 2010 11:00 pm

I’ve been doing a bit of tidying up and all that, and remembered I made this timelapse video of a Sunset over York Racecourse.

Just thought I’d share it again =)

Scheduled PostgreSQL Database Backups

By , June 11, 2009 8:37 pm

I’ve just started using PostgreSQL as my database of choice for a few projects, and needed some way of scheduling backups. As a result I’ve created the following small bash script that will backup a given database and put it in a gzipped tar archive.

You can find the script in my svn repository here.

Usage is pretty simple:

backup_pgsql dbname

where dbname is the name of the database you want to backup.

By default, the script tries to put your backup in /tmp/ – you can change this behaviour by modifying the BACKUP_DIR variable in the script – make sure to include the trailing / though.

Now, of course this is only the backup part. To schedule this, you can edit your crontab file (usually found in /etc/crontab) and include a line like this:

1  3  * * *     root    backup_pgsql dbname

This will backup the database, dbname, at 03.01am every day. Assuming your backup_pgsql is in your PATH. I put mine in /usr/local/bin/ and chmod +x it. If you don’t want to do that, simply provide the full path to the script.

Excel – Update formulas on Open

By , April 29, 2009 10:16 am

Most of the time this is a relatively trivial exercise. In the majority of cases, simply setting ‘Workbook Calculation’ to ‘Automatic’ in the Excel options will give the desired effect.

However, I recently stumbled across a situation where this doesn’t work. If you find yourself entering data into an Excel workbook through some other means – in my case, using the OpenXML libraries in C# – then you may need to force excel to update any formulas you had.

The solution is simple, using a small VB macro. To get it to happen when the workbook is opened, use the following code:

Private Sub Workbook_Open()
 
 Application.CalculateFullRebuild
 
End Sub

If you put that in the code for the main workbook (as opposed to one of the sheets) then it should happen when the spraedsheet is opened.

Getting Postgresql 8.3.x on Gentoo

By , April 12, 2009 8:47 am

I recently had some fun and games upgrading PostgresSQL on my Gentoo box – I was running 8.2.7 and needed 8.3.x for it’s support of ENUM types.

After some googling I found this blog which explained how to do it. There were a few extra steps for me, however, so I though I’d repost my findings here.

Continue reading 'Getting Postgresql 8.3.x on Gentoo'»

More Videos, SNOW! And exams :(

By , January 6, 2008 4:16 pm

Firstly, more videos. Hurray. I’ve got a few more videos uploaded in the Videos page. The links are on the left. One of the videos is related to the second point of this post, and that is that it snowed the other day, somewhat of a rare occurrence in this part of the world despite it being cold and horrible most of the year. Anywho, one thing led to another and i decided to film some snowy action outside our house.

And finally…exams. They start tomorrow and they suck. Nuff said really :(

Videos!!!111oneone

By , December 30, 2007 7:05 pm

As the title suggests, there are now videos on my website. The first one has just gone up. It’s a video of a crazy Christmas with my cousins and her children. I’ll be adding more videos as time goes by, so check up on the Videos page (link at the top right) or http://nickhowell.net/videos/ .

 

The new video is http://nickhowell.net/videos/christmas-at-the-dakins/ but i’ve password protected the page for now.

 

Enjoy.

 

Toshiba Portégé M400

By , December 30, 2007 2:13 pm

Well, as promised here is my little review on my Toshiba Portégé M400. Quite possibly the best purchase i’ve made in a long time. The M400 is known as a Tablet PC, that is, you can rotate the screen and fold it flat so that the screen faces outwards. Combined with the included Pen, you can then write on the screen as if it were a notepad.

 

This particular model came with a Intel Centrino Duo 1.66Ghz processor, 1Gb RAM and a 60Gb hard drive. The screen is 12.1in with a max resolution of 1400×1050. The laptop shipped with Windows XP Tablet Edition, but states that it is Vista Capable. XP Tablet Edition is much like any other version of XP, but with a few extras. Things like the Onscreen keyboard pops up for logins automatically, there’s a handwriting tab that allows you to handwrite text to go into Text Fields on Webpages and the like. Just silly little extras like that. Nothing amazing.

Vista on the other hand, includes all of these as standard (well, did in the Business edition i have). The M400 is indeed very capable of running vista, complete with the Aero theme which surprised me. Vista makes a number of improvements over XP with the Tablet features. The onscreen keyboard at login, for example, is embedded into the login screen as you can see in this photo. The handwriting tab is also better – it docks to the side of the screen, making it accessible at all times and very fast to load. It also dynamically adds more space if you writing a long word or sentence, unlike XP. My only gripe with running Vista is the low battery life. Under XP i could get about 3.5hours, with Vista i get around 2.5 hours if i’m lucky.

 

But anyways, back to the M400 itself. The biggest worry i had when looking for a Tablet PC was how good the touch screen was. After a bit of digging is was decided that the M400 had one of the best touch screens around for handwriting. This tablet was going to be primarily used for handwriting. Specifically, taking notes during lectures. I needed something that would allow me to write quickly and accurately. The M400 does just that. I’ve not used a tablet pc before, but based on some reviews of other devices it seems that the accuracy of the touch screens can vary widely. The handwriting recognition in XP is very good, by the way. It could recognise the majority of what i was writing without being “taught” my handwriting style. Very impressive given how bad my handwriting is. Not that it matters though as none of my lecture notes would be converted to text anyway.

 

So, as an electronic notepad the M400 performs very well. After 8 weeks of constant use every day i can’t fault it one bit. The pen is a good size, easy to hold and has a number of handy features – an “eraser” on the end, as well as a “right-click” button along the barrel, which sometimes gets in a way depending on how you hold your pen. The M400 also comes with a spare pen, which is more pda-pen sized and slots in a specially designed chamber on the underside of the laptop. The main pen fits into a sprung-loaded slot on the side next to the dvd-rw drive.

 

A few more useful features include the array for switches on the front panel. Most laptops use the classic fn+up/down/whatever keys to control volume and wifi on/off. The M400 does not. Toshiba have brilliantly decided to include a wheel to control volume, much like the ones on older cd-rom drives and a physical switch for turning the wifi on and off. Both of which are perfect. The volume in particular, as you can tell instantly whether or not you’re going to disturb the lecture when you turn on the laptop. Last but not least on the front panel you get the standard headphones and mic inputs and an array for LEDs to tell you if the laptop is on, the battery condition etc etc.

 

Along the side and rear of the laptop you have the usual array of USB ports (3 in this case), PCMCIA slot, network and modem, VGA and power. Additionally the M400 also has a 4-pin firewire port (or i.link as they are now known for some reason) and a 3-in-1 card reader that will read xD, SD and Memory Stick formats. Very handy. Lastly, the M400 includes a fingerprint scanner and the appropriate software allowing you to program in your fingerprints and use it to logon to windows, automatically fill out forms on webpages and other bits of software that require user names and password, WinSCP for example. The reader can be a little tricky to get the hang of to start with, but once you’ve got the knack it’s very good. Useful if you want to look swish in front of people you’ve never met, or if you’re paranoid about security.

 

So, that’s about it for the M400 ( i think). It’s the best laptop i’ve owned (but given that my last one was an Acer, that’s not saying much), and definitely £800 well spent. To any students out there looking for a better way to take notes and keep yourself organised, a Tablet PC is definitely the way to go, especially if you get Microsoft Office OneNote as well (more on that in another post). Tablet PCs aren’t cheap, but in my opinion definitely worth the money.

 

Another Year….Time for an update I suppose.

By , December 30, 2007 1:27 am

Well, it’s coming up to the end of 2008, and is just over 3 months since my last post so i figure it’s about time i made another to talk about all the shiney new expensive things i’ve acquired since then.

So, starting in September (ish), Uni started again…although that might be October…whatever, the point is i had to do the thinking kind of work again, instead of the putting-pasties-in-ovens-type of work. I also decided, after cursing my current laptop lots, that it was time to get a new one. This time i decided to do it properly and get a decent one – not a crummy £300 Acer. To that end i bought myself a Toshiba Portege M400 for a little under £800. It was quite an investment, but one which in the last 10 weeks has deemed itself to be worthwhile. This particular laptop is also a Tablet PC – That is the screen can swivel round and fold down so that the screen is on the outside of the laptop when the lid is down. Combined with an active touch screen and a pen, this laptop can effectively be used as a notepad. You can use the pen for the same functions you would a mouse, but with the added bonus that you can hand write things. I’ll put up a more detailed “review” later, but for the time being let it just be said that this has been the best purchase i’ve made in a long time.

 

Oh, going backwards in time now, i bought myself a new Digital Camera in the summer. Got myself a FujiFilm FinePix S5700. 7.1M pixels and 10x Optical zoom. It’s slightly chunky but takes some fantastic photographs :D More money well spent.

 

So anyway, back to October. Not a lot else interesting really happened. Start of term was manic as expected. I spent a lot of my time with YSTV getting new people involved in freshers fair, and then again providing various services with YSTV to YUSU events. Did a 21hour day on the day of freshers fair – getting new people involved in YSTV and then helping run a messaging system for Access All Areas (a huge event spanning all of Campus). Suffice is to say I was rather tired when I got home a 0430.

Rest of the term was pretty much just the same old stuff….lectures, practicals, YSTV, sleep, work….the usual. End of term I had a large hardware project to do. Which ended in me staying up till 0530 the night before the hand-in date for the write up. Again, was rather tired after that.

 

And then, at last, we come to the end of term. When lectures and practicals and YSTV and other things stop and revision begins. Oh joy of joys :/ So far my 3 week holiday comprises of the following: – revision for a week, Christmas in St Neots for a week, Back to York for New Years and revision for a 3rd week. And then exams when term starts again. Fortunately for me, we’re not at the exams part yet. Hurrah.

 

 

So, Next logical progression is Christmas. This year it was fun. I got back in St Neots on Christmas Eve to a houseful of Aunts and Uncles, which was nice – if a little unexpected. Christmas day was somewhat calmer than I remember, I think that may be on account on all of us being a year older and requiring more sleep…..or that could just be me. Either way, it was nice. As always lots of shiny new things to play with, most notably for me was a Sony miniDV camera. Specifically the Handycam DCR-HC45E, which is very nice I must say. Not quite as configurable as the DV cameras I’m used to in YSTV, but it’s an awful lot smaller and does the job nicely. It also comes with a handy docking station, although Sony did neglect to include a firewire cable, which makes capturing video from it more of a pain than usual. Under vista I couldn’t find a single tool that captured video and audio from it. Best I could manage was to turn it into a rather expensive webcam. But, not to worry….firewire cables aren’t difficult to purchase. Anyways, long story short I have a shiny DV camera and have already produced my first video. At some point in the not too distant future it’ll be on here in a sensibly marked location. I’ll let you know when.

 

So….that brings me to now….just after midnight a few days before New Year. 2007 is almost over and I’m tired and hungry (god knows why, as I’ve just eaten a large proportion of a toblerone). I guess there’s not much else to do, other than to say I hope you had a good Christmas and wish you all a Happy new Year…..oh, and leave you with an example of how good my shiny new (but not that new) digital camera is….

 

 

Gentoo Firewall/Gateway with Traffic Shaping I

By , September 26, 2007 9:44 pm

Intro

Ok, so this is a new little project of mine that I’ve just started. The idea is that I’ll end up with a machine that acts as an internet gateway for my home network with a few added features – Specifically, Traffic Shaping.

 

The reason for this is twofold – firstly, I have ADSL so too much upstream traffic results in very little downstream, and Secondly, at least two of the household are likely to use P2P programs, which generate lots of upstream traffic. So, I figured that rather than take the easy route and just make sure the upload traffic is limited at the client, I’d go for a far more interesting and complex approach and get and old Linux box to do some traffic shaping. This of course, does have the added advantage that I’ll be able to guarantee everyone a minimum amount of bandwidth.

Anyways, the point of this and a few extra posts will be to document my progress and how I’ve done it all so far.

 

Part 1

Ok, first things first I’m doing all this on an old 400 MHz machine running Gentoo Linux. There are two NICs etc etc you know the usual setup.

 

Once the system is installed you’ll need the following packages for basic NAT and firewalling

  • Iptables
  • Shorewall

     

That’s about it – an “emerge shorewall” should install both of these and anything else that’s needed. I’ve also installed Webmin to make my life easier for configuring a few things. Shorewall in particular is nice and easy to setup there. Just make sure Masq is setup and that your interfaces are there and assigned to the correct zones. Set the defauly policy to ACCEPT all traffic (we can make it more secure late) and away we go.

Next we need a DHCP server to run on the internal interface “emerge dhcp” will install one for us. Edit /etc/dhcp/dhcp.conf.sample to your liking and save it to /etc/dhcp/dhcp.conf . Also edit /etc/conf.d/dhcpd and set the listen interface to your internal interface – In my case eth1. Next, start up dhcpd (/etc/init.d/dhcpd start) and check for any errors. It’s a good idea to have a System logger installed for this bit (as I discovered).

 

 

So, next task is to connect it all up physically and test that is does in fact deal out DHCP addresses and you can still access the internet. Assuming it all works, then say hurray. If it doesn’t, then there are plenty more comprehensive tutorials to guide you through the process.

 

 

So…that’s about as far as I’ve got so far. In the next few posts I’ll be detailing the process of Traffic Shaping and probably setting up a DNS server….maybe.

Panorama Theme by Themocracy