I’ve been switching OSes quite a bit since I got my HTPC. At first, I was certain I wanted Linux on it. I eventually gave up because VAAPI (the Video Acceleration API) was making me get headaches. I went and installed Windows, but I’m not too fond of that; so after about two weeks, I tried getting VAAPI to work again on Linux. Again, without results. I did read some articles on OpenELEC, XBMC Ubuntu (former XBMC Live) and XBMC Freak earlier, but it didn’t seem to fit my needs. XBMC Ubuntu and XBMC Freak still had issues with VAAPI support. That would leave with me with the exact same issues as installing Ubuntu stand-alone. OpenELEC didn’t really seem to fit either, since I wanted to use the machine as a download system as well.

The OpenELEC logo.
Well, it seemed irrelevant, until I found out that OpenELEC has an add-on called SabNZBd-suite which turns your HTPC in a download machine besides functioning as a home theatre system. Installing SabNZBd-suite sets your system up with three applications: SabNZBd, Couchpotato and Sickbeard; pretty much all you need for downloading films, music and tv-shows at the easy of simply entering the names of the films you want.
For those who are not familiar with these applications, I’ll try to describe it as short as possible: “Pure awesomeness”. Nah, for real; these applications make extending your collection even easier. All three tools are web-based, so your downloads can be maintained from other systems on your local network. First off, SabNZBd is a downloader. Just add NZB’s and it’ll start downloading, repairing and extracting. Couchpotato is an application to automatically search for films. Need a new film? Add it as ‘Wanted’, specify your desired quality (480P, 740P, 1080P etc) and it will periodically search for it’s availability. When it finds a NZB that matches your requirements, it’ll download the NZB and automatically pass it to SabNZBd for downloading. When it’s finished downloading, it will rename the file accordingly and move it to any directory you specified. It can even notify XBMC that it just added a new movie, so you don’t have to refresh the library yourself. Isn’t that fun?
Sickbeard is basically the same thing as CP, except it’s designed for downloading and indexing tv-shows. Besides for searching, it is also an excellent tool for indexing shows. It will easily show you which episodes are missing. Perhaps find the ones you are missing ;-)
Anyway, I’m very pleased with OpenELEC. There’s a special release for AMD Fusion machines, which has no issues at all with the VA API. Smoothness all the way. Since OpenELEC isn’t running on any specific distro like Ubuntu, it is much smaller and lighter than Ubuntu with XBMC on it. It’s only around 110MB and is provided with a tool for creating a bootable USB. You should try it, I absolutely recommend it.
SSH is also enabled by default, log in using root / openelec or just add your key to ~/.ssh/authorized_keys and rock on. Cheers!
References:
Recently, one of my customers asked me to integrate iDeal and Paypal payments in a system I had to write. He hooked me up with a service called Icepay. It’s a company that basically acts as a middleman between you and the payment service. They offer a pretty straightforward API to complete payments on your demand. I’ve successfully implemented it in a system built on CakePHP and thought I’d share my thoughts with you guys.
They offer API’s for several languages. I only worked with the PHP API so I cannot judge over their other implementations.
They offer a range of classes to process the payment. Basically, all the payment method classes do is build a valid URL to redirect to. The entire payment process is done on the Icepay server, so no need to implement it in your application at all. All you do is provide the right parameters and redirect the customer to the payment page. As the customer completes the payment, the Icepay server does a POST request to your server. Don’t worry, this so called ‘Postback URL’ can be altered to your needs ;-) When you create an instance of the Icepay_Postback class on the postback URL, you can validate the payment and get it’s status. This status tells how the payment was processed, like OK, ERROR, CHARGEBACK, REFUND or OPEN.
Let’s proceed with a minor implementation to give you an idea. The example below is based on Paypal.
$payment = new Icepay_Paymentmethod_Paypal();
$payment->setMerchantId('merchantid')->setSecretCode('secretcode'); // You get these when you apply for an Icepay account.
$payment->setCountry('NL')->setLanguage('NL');
$payment->setCurrency('EUR')->setAmount(1234); // Prices in cents, so 100 would equal 1 euro.
$payment->setReference('Your name')->setDescription('This is your order.');
$payment->setOrderId(1); // Give a unique order ID. There can be no duplicates.
header('Location: ' . $payment->getURL());
That is basically all you have to do as far as redirecting the customer to the payment page. This page will show the customer where it got redirected from, what he’s about to pay and what the price is. Simple, huh? Let’s create the page for processing the payment. As I mentioned earlier, the Icepay server will do a Postback to your server on a specified URL. All you have to do is make sure that the payment is valid and handle stuff in your system; perhaps setting a column in your database to ‘PAID’ when everything went as expected. Doing this is peanuts:
$postback = new Icepay_Postback();
$postback->setMerchantId('merchantid')->setSecretCode('secretcode');
if ($postback->validate()) {
switch($postback->getStatus()) {
case Icepay_StatusCode::SUCCESS:
// Successful payment
break;
case Icepay_StatusCode::ERROR:
// Some error occured
break;
// and so on.
}
}
You have just successfully implemented Paypal payments. I don’t know if it is much easier than implementing Paypal on its own (so without Icepay) since I do not have any experience with that but I think this implementation is quite easy. Even novice scripters should be able to implement this without issues. They offer a veriety of methods which I’m not listing here. You should feel free to check them out! :)
I hope this article has been of use. Cheers!
Say, you don’t have enough money for a Philips Ambilight television but you do want decent backlighting for you TV. A normal 15W lightbulb would do, but you can also do it with style. I chose the latter and searched for possible ways of creating a TV backlight. I stumbled across the IKEA website. They offer LED-strip kits for very low prices. There’s normal kits (a warm, white color only) for €20,- and a RGB kit for €30,-. This seemed a nice solution for TV backlighting, as it comes in four individual strips which can be connected together, or used as single pieces.

IKEA Dioder in action.
As for me, I placed two strips (25cm) on each side of my TV and connected two strips so I could place it on the top. They give a nice, spread lighting behind my TV.
So what is this Dioder set capable of you might ask? Well, it comes with a controller as well. The controller has three buttons. One power button, a button for toggling through colors and one for slowly cycling through colors, where colors fade onto each other. There’s also a slider that lets you decide what color to create. I personally like a white-blue-ish color the most, but that’s just my personal preference.

Different colors on the Dioder.
It’s not ambilight ,but it sure does perform well given it’s price (€30,-). I didn’t regret my purchase :)
Just recently, I placed my HTPC in a small cabinet, with two 80mm holes in the back for ventilation. However, I did not want to let my system overheat, since Zacate’s tend to get pretty warm. Because of that, I decided to order myself a slim fan (15mm thickness at max) which I just keep in place with rubber bands. Since my Mini-ITX case is really open (the side is fed with vent-holes), it has the room to breathe.
Anyway, I started looking for a silent, slim fan to put on. After measuring the size of the heatsink, I found out a 80×80 fan would be perfect. However, I couldn’t find a 80×80 fan with a maximum thickness of 15mm in a local shop. I could find 100*100 or 120*120 however; so I decided to go for 100mm. After filtering out some results, I found the Scythe Kaze Jyu slim (100*100*12) fan with a max RPM of 2000, airflow of 27.6CFM and a max sound emission of 29.2dBA.
I have done some testing with a Intel CPU cooler before on this board, and found out that it isn’t neccesary strap on a fan with high airflow. I could barely notice a difference between full RPM (2600) or 40% (1000). Only a few degrees, which, in my opinion isn’t worth the noise it produces. The E45M1-i Deluxe (a Fusion E-450 btw) allows you to control the fans’ speed. It ships with ASUS software that allows you to draw a graph or pick one of the presets. Awesome! :)

The Scythe fan mounted.
After mounting the fan, the system (in the cabinet) idles around 37-40 degrees celcius. That is with the fan at around 50%. I’m having a hard time hearing it spin so that’s great. Turning the fan to 100% makes the temp drop around 3 or 4 degrees but I think these temps are just fine. Whilst watching a 15GB 1080P movie the temp goes to around 43 degrees (average CPU load 35% in XBMC in case you’re interested). On full load (2 threads in Prime95) temps rise to around 45-46 which is still nice :) The system is still very quiet yet it is perfectly cooled. The cabinet resides in my bedroom and I can not hear the system when I go to bed.
Here’s a pic of the fan mounted in the system at the moment.
That wraps it up I guess. I’m absolutely enjoying my HTPC, I hope you enjoy yours too! ;-)
As you might have read in my previous post, I recently built myself a HTPC with an AMD Fusion Mini-ITX board. However, I was having issues with video playback on Windows 7. Sometimes, video playback stalled and continued after 5-10 seconds. It felt like it was a buffer issue but changing the buffer size did not help. I kept searching on the internet but everyone with this problem seemed to stream video’s over network. I wasn’t.
After a while, I stumbled across a topic where someone claimed his VQ value (you can see this in XBMC after pressing ‘o’) dropped. When this value reached below 10%, playback stalled. This got me more terms to search for, but still no luck.
As I’m streaming video from my external harddrive (WD MyBook 2TB USB3), I started to search for problems people had with external drives. That got me more results, as I came across pages where people claimed they had issues while transferring files from and to external USB drives. Interesting, since streaming a video is basically transferring data as well. At this point, I knew I was heading the right direction, since my sister mentioned the harddrive LED stopped flashing as well when this happened.
Finally, I found that there were a couple of USB settings in the Power Management menu, one being “Selective USB suspend”. I don’t know how this thing is supposed to work, but this seemed to suspend the drive while streaming video from it. It might also have suspended it when the drive wasn’t active (perhaps when it had a certain part buffered?). Anyway, this seemed to have fixed my issue. I haven’t had any playback issues since.

Selective USB suspend
I just wanted to share this with you guys, since I had a hard time trying to figure out what was going on. If you have the same problem, I hope this just helped you solve it :) Cheers!
I wanted a home-server for quite a while now, especially since our 100Mb fiber connection will be connected within a few weeks. The only thing that kept me from ordering one was the price. Since I do not own a desktop PC (only laptop), I’d have to order myself a monitor as well. And besides the price, I wouldn’t even know where to put it, untill a few weeks ago.
At my work, I spoke to a collegue who explained what a HTPC was. The first thing that came to my mind was: THAT’S IT! He explained me I could connect it with my HDTV directly through HDMI. That way, you can directly stream video’s on your TV; so no need for an external monitor. He confirmed there even were keyboards with an integrated touchpad, so an external mouse becomes obsolete. I had my mind all set to it, so I started searching on the webs.
My first idea was to build a PC with one of the AMD APU’s, since they offer great performance given the price. The only thing that kept me down at this point was the noise. Having an APU with a 65 watts TDP, it most likely requires active cooling; unless you want to spend another 40-50 euros on a nice passive heatsink. I’d also have to get myself a case with a 250W PSU, which are also most often equipped with a fan.
After reading some topics on the Gathering of Tweakers, I stumbled across the AMD Fusion APU’s. About the same price as budget Liano APU’s (CPU+Mainboard combo), but much more efficient. As for what I read, they were perfectly capable of playing 1080P movies.
At that point I thought: ‘With a TPD as low as 18 watts, I might be able to pull off a completely passively cooled HTPC!’. And so I went.
After browsing many, many webshops I finally completed my set-up, completely passively cooled, so no noises! That’s awesome, the PC would be in my bedroom (next to my TV).
Gimme specs!
- ASUS E45M1-i Deluxe (AMD Fusion E-450, Mini-ITX)
- Antec ISK110 (Mini-ITX, 90W PSU)
- Corsair 4GB DDR3 1066 (I discovered I could’ve taken 1333 afterwards)
- OCZ Vertex 3 60GB (Had this one as a spare)
As it is also used as a download machine, it will be equipped with extra disks through USB and eSATA. Since the OS is installed on the SSD, the external USB disks will turn off after a given period of time. This way, I get 0 noises at night. When the OS would have been on a normal disk, chances it would turn off would be very low. Besides, having USB and eSATA drives allows me to unplug a disk and use it on a different machine.
Anyway, I would have loved to run Linux on it, but after spending about 20 hours on getting Video Acceleration to work I eventually gave up. It seems to be a pain to set it up correctly, from what I’ve read. I am currently running Windows 7, which does the job just as well. XBMC runs like a champ.
Pictures

The internals.

HDD bracket.

Connectors at the back.

In place.

XBMC = no problem.

Windows Performance Index
If you have any questions related to my HTPC, feel absolutely free to leave a comment. It’s much appreciated :]
So I grew up with Windows, the most widely used OS. I never really felt it fit me, but I did not see any reasons to go to another OS (like Linux) since I was a die-hard gamer and games do not run properly on Linux (some might though, under Wine). Anyway, as I kept spending more time programming, my frustration started growing. I read a lot of promising stories about programming under Linux so I decided to get myself a decent book and start reading.
After about a month (summer holiday) I gained quite some knowledge already. I was able to perform some basic stuff in the terminal and I really started getting used to the shortcuts for navigating through workspaces, opening terminal windows, etc. I started off with Ubuntu 10.04, default GNOME 2 interface. Nice and clean. When Ubuntu came up with Unity however, I moved on to Linux Mint 11, which did use the GNOME 2 interface. I have been using Mint ever since, currently at release 12. It ships with the so-called MGSE interface, a mix between GNOME 2 and 3.
I have actually disabled the bottom-bar and replaced it for an OSX-alike dock. Does its job great and looks neat. That does mean I do not have a taskbar however; but I manage my opened windows with the Windows-key. That triggers the GNOME shell, a piece of art. I love it!
Anyway, back on topic. I was about to talk about my experiences from moving from Windows to Linux, didn’t I?
Let me sum up some things I think are superior to Windows:
- It works incredibly quick, I get 11 second boot times (from powerbutton to desktop) on my SSD. Windows 7 booted in about 20-25.
- Having multiple workspaces is GREAT. Once you get used to the shortcuts you’ll never go back!
- No need for virus scanners which slow down your system.
- Insane hardware compatability out-of-box. I didn’t have to use any drivers on my lappy.
- Comes with nearly all the software you need, from office tools to mail, disk burner, you name it.
- Flexibility. Linux allows you to customize everything. You can even modify the kernel if you like (only for experts).
- The PPA repositories make installing software a breeze. Installing software is as easy as ‘aptitude install <name>’. Say goodbye to those ‘Next, Next, Next’ installers. The built-in software center does a decent job as well.
- And to some most important, it’s an Open Source product. It is maintained by the community which means updates come lightning fast. That also makes it free of use.
There are some downsides though. Windows applications do not run by default on Linux. There are tools to get some working, but in my opinion it is not ideal. So if you’re a person that likes to play games on regular basis; stick with Windows or create a dual boot system.
I have been using Linux for almost a year now and have really gotten used to it. I do not want to go back to Windows. As for programming purposes, I think Linux is far superior to Windows. Everything just works a lot faster. Give it a try, you will not regret!
As for my system, I own a Dell Vostro V131 (i5 2430M) with a 128GB Crucial M4 SSD and 8GB of Corsair DDR3 ram. All of my hardware works without installing any additional drivers, except for the fingerprint reader. But who uses those anyway, huh?
I want to end this article with a screenshot of what my current desktop looks like. I did some light modding, like adding some GNOME shell extensions, themes, a dock etc. Hope my article conviced you to give Linux a try. If not, I did my best. Cheers!

It seems a big issue that people with distro’s that use the 2.6.38 kernel and above have serious battery life issues. Some report a 40% decrease of battery life over older kernels / Windows. I’m affected with this as well (since Linux Mint 11 uses the 2.6.38-16 kernel). As I started searching, I came across several GRUB boot options that should increase battery life a bit.
As for now, I’m running Mint 12 (3.0 kernel) and also this kernel has the same issue. I used powertop to track the power usage of my laptop. After a fresh install, minimal brightness, keyboard backlight off, bluetooth off and WiFi on; I was not able to get below 15 Watts idle.
Then, I added the following boot options to GRUB:
pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1
These options made me get as low as 9.7 Watts on idle. It still doesn’t get me the same battery life as Windows does (I’ve had a report of 9.33 hours of battery life left once) but it did increase my battery life by 35%!
Apparently, this issue will be fixed in kernel versions 3.2 and above. Untill that point, I’m satisfied with the 6 to 6.5 hours my laptop gets now.
Absolutely loving my current laptop, a Dell Vostro V131. It’s got a 6-cell battery, a backlit keyboard, an i5 2430M, 8gigs of RAM and a 60gig SSD. It’s a breeze to work with really.
So, today (21st of october) I was busy working on a Facebook-alike project for school using Rails 3.1.
In this system, only friends should be able to view each others profiles, so I had to add a before_filter to check wether the current logged in user is friends with the user to be viewed.
Nuff said, I decided to create a method called is_friend_of? in the User model. Shouldn’t be too much of a hassle, right?
def is_friend_of?(user_id)
((id == friend_id) || !friendships.find_by_friend_id(friend_id).nil?)
end
Should work, so I thought. But it didn’t. After some debugging (logging data to my Rails console), I eventually logged both the current (logged in) User ID and the ID of the page being viewed. The output surprised me even more:
====== Logged in user: 1
====== Viewing user: 1
You might be able to guess what my next step was. Call the ‘class’ method on the (as for what I thought) numbers aka FixNums.
====== Logged in user: FixNum
====== Viewing user: String
Apparently, parameters are passed as instances of the String class, but the ‘id’ method on the ActiveRecord object returns a FixNum instance. Could’ve thought of that..
Solution:
def is_friend_of?(friend_id)
((id == friend_id.to_i) || !friendships.find_by_friend_id(friend_id).nil?)
end
So what did I learn from this? Exactly. Don’t assume objects are of same type, check it.