Archive for the ‘tweaking’ Category

4GB tuning

Monday, July 7th, 2008

By default, on a 4GB 32-bit system, windows only gives 2GB to the application. To increase the amount of total user virtual address space, edit your boot.ini and include the /3GB option. With the /USERVA you can tweak the amount between 2 and 3 gigabyte. So you can not allocate more than 3GB for applications.

Furthermore, you must relink your application with the /LARGEADDRESSAWARE option to make use of this ‘4GT’ feature. You can also modify an existing binary by using editbin.

source: MSDN

Lirc on openSUSE 10.3

Wednesday, January 30th, 2008

I somehow always procrastinated the installation of my Hauppauge WinTV PVR 150 IR remote because it somehow didn’t work out of the box, but today I took another shot at it and was surprised how easy it all turned out to be!

The first thing you need to realize, is that you need to install a kernel module: lirc_i2c. Unfortunately, due to a string length being shortened in recent kernel, the suse provided kernel module does not work! Instead, grab a freshly compiled one from here. After having this installed, you should already have a working remote! (you might want to tweak your /etc/sysconfig/lirc : choose the hauppauge driver and the lirc_i2c module, but the defaults seemed to work too). You can test your remote by doing a cat /dev/lirc and pressing some remote buttons.

Easy, no? :) The rest is application specific configuration ;) Be sure to have a look at KDE’s infra-red app, IRKick, which does a great job at binding through DCOP!

One thing to note though, is that the default lirc config is supposed to create a device /dev/lircd from /dev/lirc when starting lircd, but in my case, it wouldn’t do that until I specifically told it to create that one through the –output param (only had to do this once).

I was greatly helped by the following sources: mythtv 1, 2

Redirecting error output on windows console

Thursday, January 17th, 2008

I thought I already blogged this, but I can’t find it back, so let me try one more try as I seem to need this from time to time and then fail to remember the correct syntax! :)

The scenario is: you have this huge error output on your console (for example a very long compiler error). Since it is quite long, console history is not big enough to see the beginning. You could of course increase the history size, but it’s not a real solution. Everyone knows how to redirect console output to a file, simply like this:

type myhugefile.txt > output.txt

This is all nice and dandy, except, it doesn’t capture the error output (stderr) (which is exactly what we’re interested in ;)). You have to do some win32 console-fu as follows:

mingw32-make 1> output.txt 2>&1

This tells the shell to redirect standard output (stdout) to output.txt and redirect error output to standard output.

You can read all this information in a nice collegebook format on MS’s KB.

Essential Kate tweak

Monday, December 3rd, 2007

If you like opening all your documents in a single instance of Kate, replace the command line “kate %U” used in KDE’s file binding by “kate -u %U”. This is actually quite well documented in Kate’s manpage as well as on the faq on the homepage, yet somehow I thought it is useful to note this one down as it is not accessible from the GUI.

You can find KDE’s file bindings here: control center > KDE components -> file associations. From then on, every file you like to open with kate through the context menu will use those settings, even when it’s not a txt.

UNC paths in windows command prompt

Thursday, August 30th, 2007

This one comes in handy from time to time…

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"DisableUNCCheck"=dword:00000001

It enables you to run a process defined by a UNC path through the command processor, or through your code (CreateProcess) for that matter.