Posts about tip (old posts, page 1)

Pretty-printing XML with Emacs' NXML-mode

Did you ever get a stream of XML out of a log file, or in a data stream, and it's all mashed together without line-breaks so that it just appears as gobble-de-gook? If there's a data error (not an XML parsing error) then you have to read it so that you can find where the error is, but you don't have XML-spy and NetBeans is overkill or takes forever to fire up...

Emacs to the rescue! Benjamin Ferrari wrote this increadibly useful (and simple) elisp function to pretty-print a block of XML code:

Read more…

Solaris X11 and Dvorak simplified keyboard layout

I've recently been playing with OpenSolaris and Solaris Express DE running in VirtualBox. They're fine so far (except audio isn't working) but I stumbled on a usability issue that was nearly a show-stopper: dratted QWERTY layouts! The GNOME GUI for switching to Dvorak doesn't work, and setxkbmap(1) can't find the rules file for dvorak either (they don't seem to be installed where the man page indicates)...

Read more…

Compiling JNLP projects under stock NetBeans 6.x

This is a pretty simple issue that was easy to solve but took a bit of fumbling around...

I recently checked out the new Java SwingSet3 project from it's SVN repo, to play around with it. It's a NetBeans project so it was simple enough to fire up NetBeans 6.0 and use it's built-in Subversion support to check the project out from the repository directly...

My plan was very simple: check out the code with NetBeans, build it, run it (using JDK 1.6.0_10 beta for the new Nimbus look/feel too) and then hack at the code.

Read more…

Cygwin users and groups

When you first install cygwin and run bash, it'll usually display this error message:

Your group is currently "mkpasswd".  This indicates that
the /etc/passwd (and possibly /etc/group) files should be rebuilt.
See the man pages for mkpasswd and mkgroup then, for example, run
mkpasswd -l [-d] > /etc/passwd
mkgroup  -l [-d] > /etc/group
Note that the -d switch is necessary for domain users.

Read more…

Dvorak keyboards

This post was originally published at on 27 March 2006.

I prefer Dvorak keyboards to QWERTY, which confounds my work colleagues no end :-)

I've been typing on Dvorak for about 3 years now [ed: That is, since 2003]. The main reason I use the Dvorak keyboard layout is because, after 15 years of six-finger typing on QWERTY, I decided to learn to touch-type, and Dvorak is very easy to learn (I learnt it in 2 weeks, back to my old typing speed after a month).

Read more…

Xine performance

This post was originally published at on 31 October 2005

Now playing with Gentoo as my latest Linux of choice (I got fed up with RPM dependancy problems, and Gentoo being source-based solves my other issue with binary-based distributions, where I felt like a 2nd-class citizen when using or accessing source code).

So, I've got Xine working, but can only use shared memory for the video decoding. This is great if I want to capture screen shots, but not for high-speed movies such as The Matrix, or even just reading the credits on The Lord of the Ring. So need to "fix" the performance.

I used to have Mandrake running v4l + xv, but I can't have installed it right in Gentoo because, although xv is loaded, the performance is glacial if I try to use it.

I found this old How-to with some advice to try... but I might also want to look at the FAQ.... probably I haven't built something into the kernel.

Also while reading around, I discovered Mplayer. This looks like it's worth a download...

Radeon Performance Enhancement

This post was originally published at on 30 March 2005

Place these settings in your xorg.conf:

The RADEON driver (man radeon) supports the following options for the RV280 chip (which is found on RADEON 9200 boards). The default values are in red:

  • Option "AGPMode" "1" (driver currently supports up to x4)
  • Option "AGPFastWrite" "off" (only used when DRI is enabled)
  • Option "BusType" "AGP" (if driver's bus type detection is wrong)
  • Option "DisplayPriority" "AUTO" (set to "BIOS" or "HIGH" to fix tearing)
  • Option "EnablePageFlip" "off" (turn "on" 3D page flipping for better performance)

The biggest wins would come from APGMode and EnablePageFlip. APGFastWrite may help DRI. DisplayPriority may help KDE. Don't use BusType unless the log shows the driver has selected a PCI bus for the card...

Note:- when playing with Xorg 6.5 I got X crashes with EnablePageFlip turned on.