Thanks to Apple support and Jochemv at forums.macosxhints.com (see the corresponding thread), my issue with the Bluetooth-PDA-Sync serial device is finally resolved. As I wrote about it previously, I was simply not able to turn it on, thus defeating my attempts to sychronize my Mio through Bluetooth. The solution was simply to delete com.apple.Bluetooth.plist in /Library/Preferences (note that this is the system-wide Bluetooth configuration file, so maybe you'll need the admin password) and reboot. I feel slightly embarrassed because I hadn't thought about it before and tried much more complicated ways of debugging, like dtrace-ing System Preferences.app. Since I wanted to investigate the issue more closely, I made a backup of the above mentioned plist file and compared it to the regenerated one. The only inconsistency I encountered were two additional keys in the old version of the file under Root/PersistentPorts/incoming port - Bluetooth-PDA-Sync, namely BTPortInUse and WaitingForMatch, both having a value of 1. I suspect that deleting these two keys from the plist file would have resolved the issue as well.
Bluetooth issue resolved
Highlighting leading tabs in vim
There are some circumstances where having leading tabs in a file is a Bad ThingTM (like in Python source code, according to PEP 8). There are some other circumstances where they are vital and can not be substituted by spaces (like in Unix makefiles). In both cases, it is useful to have a visual clue in the editor that shows tab- and space-based indentation differently. vim's syntax highlighting facility provides a handy way to distingush them:
:syntax match Error "^\\t\\+"
The line above colors all leading tabs to red in the default color scheme - very useful for makefiles. A slightly different variant highlights tabs even when they are preceded by spaces - this can be used in Python source code to remind ourselves to indent everything by spaces and not tabs:
:syntax match Error "\\(^ *\\)\\@<=\\t\\+"
The latter one is so useful that I added it to my .vimrc to execute automatically whenever I load a Python source file:
autocmd BufRead *.py syntax match Error "\\(^ *\\)\\@<=\\t\\+"
leopard wtf #1
OS X Leopard alatt a Word 2004-ben a hosszú ó leütésének hatására felfelé lép egy sort a kurzor. Ha a Keyboard Viewer-ből nyomkodom, akkor is. WTF?
sfPropelValidatePlugin, unit testing and internationalization
Symfony's sfPropelValidatePlugin is a great feature (finally letting me use the Symfony validation framework even in the model layer), but it does not play well with unit testing, so I had to tweak it a little bit. Read more
X11 bug in OS X Leopard
The brand new X11 (based finally on X.Org instead of the XFree86 codebase) truly has some bugs that have to be ironed out. The first and most annoying of it all is that it keeps one of my CPU cores running on 100% on certain occasions (which I have not been able to reproduce in a deterministic way). I think it must be some kind of race condition. The good thing is that the bug is already fixed in the most recent Xquartz binaries. Jeremy Huddleston maintains a script that installs the latest development updates for Xquartz and related libraries. The easiest way to update X11 is to use this script:
curl -LO http://people.freedesktop.org/~jeremyhu/x11-apple/x11_update.sh sudo sh x11_update.sh
Full POSIX path in Leopard Finder title bar
Try this: defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES && killall Finder.
Cleaning up a freshly installed Mac OS X Leopard
I have just installed Mac OS X Leopard on my MacBook, and it needed quite a lot of tweaking in order to make it usable again, so I thought I'll just collect these little tidbits - maybe it helps someone else as well. I was able to gain almost 5 Gb of wasted disk space back just by removing the unneeded features of Leopard, like the Japanese-English dictionary or the new speech synthesizer voice taking up over 600 Mbytes alone. Read more
Sumatra PDF viewer
Some time ago I blogged about Foxit Reader, a free, lightweight and fast PDF viewer for Windows. Now I have found an even better alternative: besides these advantages Sumatra PDF viewer is completely open-source and does not require any installation at all, making it an ideal PDF viewer to carry around on a flash drive.
Line styles and colors in gnuplot
http://en.wikipedia.org/wiki/Image:Ps_symbols.svg
A nice figure showing all the default line styles and colors in the SVG terminal of GNUplot. Similar figures are available for the monochrome and the color PostScript terminal as well. Very useful when preparing figures for a scientific paper.
When Sysadmins Ruled the Earth
Only twice did I stumble upon the genre of post-apocalyptic science fiction before: first when I played with the classic game Fallout (I hope it gets abandonware soon), and last when I read the excellent book of Isaac Asimov and Robert Silverberg titled Nightfall -- although the latter one is not a typical example of the genre mostly because it takes place on an alien planet instead of Earth. And similarly, only twice did I see the name of Cory Doctorow before, both times in the blogs of self-appointed "web 2.0" evangelists, prematurely leading me to the conclusion that he is another self-appointed "web 2.0" evangelist not worth paying attention to. That's why I was utterly surprised when I found his name on the list of Locus Award winners in 2006. Read more