Sociable Plugin Doesn’t Play Nice

I’ve been using the Sociable plugin for adding easy “share” links to the bottom of my posts. Up until yesterday I’ve been using the 2.x versions of the plugin, but yesterday I’ve upgraded to 3.4.4. Today I’ve noticed to my surprise that the plugin automatically adds a box to my admin dashboard with “The Latest news from Yoast”, Yoast beeing the plugin’s maintainer, Joost de Valk, blog. The plugin itself doesn’t feature any way to completely disable this “feature”. One has to hide it using the dashboard settings. While this may seems benign, in my opinion its pushing the limit. If I’m interested in getting updates from that blog, I would sign up to its RSS feed. I don’t like getting “free” functionality not advertised in the plugin description.

I must add that as a user of the Sociable plugin, I’m more than satisfied. I probably won’t stop using the plugin just because of this issue, but it still seems to me like improper manners.

Designing a Better a CSS RTL Convertor

About a year and a half ago I’ve released cssrtl.py, a script that translates CSS code to RTL. The script was designed to be fully autonomous, however translating CSS code is a complex task, as not all the information needed to make the translation is available in the CSS files. While cssrtl.py did a very good job on some tasks it lacks on several issues:

  1. When a design update is released, one cannot use previous translation work.
  2. When things don’t go smooth, it’s hard to find out why.
  3. Complex CSS can’t be translated automatically, as it requires understanding of the structure of the corresponding html files and how the CSS will be used by future code.

Continue reading Designing a Better a CSS RTL Convertor

Over Looking the Simple Solution

Few days ago I’ve decided to start logging my rowing sessions. I disliked the idea of keeping the log on paper, so I’ve looked into a computerized solution. I ruled out Concept2’s online log book, because I wanted something private which wouldn’t require me to register on yet another website (and sometimes internet access at my rowing club is broken). Soon I’ve decided to manage the log using TiddlyWiki, a client-side html+js wiki, which I wrote about in the past. It some nice features:
1. It fits in a single self contained file that is perfect to put on a usb-stick.
2. It has built-in search features.
3. It allows great flexibility in how to log my sessions – no predefined format which I need to struggle to fit my sessions into.

The TiddlyWiki solution seemed great, and I’ve started using it. But as the title says, I merely looked over much simpler, yet as powerful, solution – a simple text file. Porting my rowing log to a simple, old-fashioned, text file provided me all the relevant features of TiddlyWiki, such as search, flexibility and working from usb-stick, while using less space and editable using a basic text-editor (or the powerful vim). Using reStructured Text, I got a nice readable journal that can be later processed into even nicer looking html files.

We all want to believe that we know to match the right tool for a task. But maybe, because we tend to adopt newer technologies and utilities all the time (because for a lot of tasks they do provide better tools), we end up over looking simpler, “old-fashioned”, solutions. If I take a moment now to look around, I can come up with several other places where new stuff is used instead of simpler solutions. Take a look around you, and I’m sure that you will be able to find some too.

\lyxframeend Undefined when Using Beamer with Lyx

I’m using LyX for the first time with Beamer. Making the title page was smooth. But when I’ve tried adding a new frame (using BeginFrame) I was confronted with the following error

 \lyxframeend
                 {}\lyxframe{Outline}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

After comparing my document to example (working) beamer documents I’ve found out that you must have an EndFrame command after your last frame. Too bad it wasn’t documented anywhere I’ve found as this little thing drove me crazy.

Using Amarok Generated Playlists (m3u) on Sansa Clip

Few days ago, for the first time, I’ve created a playlist using Amarok for files on my Sansa Clip player. To my surprise (and disappointment) when I’ve unplugged my Sansa Clip and powered it, the playlist showed up empty, unlike playlists which originated in Windows. As I keep my music collection organized in Amarok, the situation seemed to be very uncomfortable.

I’ve decided to compare one of the working playlist files and the “empty” Amarok generated playlist. Two things were noticeable:

  1. Amarok uses forward slashes, like in a Linux environment, and the working playlist used backward slashes.
  2. The working playlist used relative paths without any prefix – directly beginning with the path. Amarok prefixed the relative paths with a dot-slash (./).

After noticing those things I’ve modified my Amarok generated playlist to look like the Windows generated one, and voila, it worked. I tried going through Amarok’s configuration dialogs to find some option controlling the format of generated m3u playlists, but couldn’t find any (I’m using Amarok 1.4.10). So with my newly found wits I’ve looked for a way to make using the playlists easier. I’ve came up with the following one-liner:

find -name "*.m3u" | xargs -I{} sed "s/^\.\///;s/\//\\\\/g" -i'' {}

The command should be run in the MUSIC directory of the Sansa Clip’s filesystem. It recursivey looks for m3u playlists and for each one strips any leading dot-slash and replaces forward slashes with backward ones. It can be used to easily convert all your playlists to the format understandable by Sansa Clip.

Emulating Kav-Mafrid (em-dash) for the David Font

The David font that is used in Culmus-LaTeX lacks support of Kav-Mafrid, the ligature that is created by two consecutive dashes, --. Because the regular Hebrew dash, Maqaf, is position near the top of the line, one can’t use it instead of the Kav-Mafrid and expect a graphically pleasant result (while Kav-Mafrid can replace Maqaf and the text would still look ok). To make things even more problematic, this ligature is supported by Culmus-LaTeX’s default font, Frank Ruehl, which means one can’t easily switch fonts without hurting the layout.
Continue reading Emulating Kav-Mafrid (em-dash) for the David Font

Getting Hyperref to Work with Hebrew (in XeTeX)

The hyperref package is notoriously known to cause problem with RTL text, which unfortunately include Hebrew. In this post I present some preliminary workarounds that enable the user to use the hyperref package with Hebrew and possibly other RTL languages. The solution requires XeTeX which is available in TeXLive. I had no success, yet, to port the workaround to pdfTeX, which is more popular.
Continue reading Getting Hyperref to Work with Hebrew (in XeTeX)

Upgrading All KDE Related Packages in Gentoo

Yesterday, Gentoo marked KDE 3.5.10 as stable on amd64. I looked for a way to upgrade all of the KDE related packages, without manually specifying each one of them. Normally one could do

emerge -avu world

but I encountered some nasty conflicts that I didn’t have time, nor will, to resolve at that time. So I’ve looked for a different solution. To my rescue came qlist for the great app-portage/portage-utils package. This package provides a set of very fast utilities to query portage. I’ve used qlist to list all of my installed packages, grep‘ed the list and piped the result as arguments to emerge using xargs.
Continue reading Upgrading All KDE Related Packages in Gentoo

Installing Lighttpd-1.4.22 on Ubuntu 8.04

I had some problems with the lighttpd-1.4.19 that comes with Ubuntu 8.04, mainly it’s problems of handling the HTTP header Expect: 100-continue (which older versions of Lighttpd return error 417). The problem was fixed in Lighttpd-1.4.21, but 1.4.22 is the newest version so I’ve decided to install it.

As I mentioned before, Ubuntu doesn’t have lighttpd-1.4.22 for 8.04, and it’s also not available in the updates or backports repositories. Fortunately, I’ve found that the package is available from Debuian Sid (unstable). Here are some instructions on how to install it.
Continue reading Installing Lighttpd-1.4.22 on Ubuntu 8.04