Login

Firefox3 bookmarks toolbar under Linux

Written on 2008-10-21 09:36.

Firefox 3 is great. But there is one minor change which annoyed me: those new arrows next to each folder of the bookmarks toolbar. It takes up a lot of space for nothing, preventing all my folders to appear within the width of my screen. Luckily, there is a way to hide them:

#> cd ~/.mozilla/firefox/DefaultUser/chrome #> cp userChrome-example.css userChrome.css

edit userChrome.css with your favorite text editor:

#> vi userChrome.css

add the following line:

#PersonalToolbar .toolbarbutton-menu-dropmarker { display: none !important; }

(found in http://ubuntuforums.org/showthread.php?t=732134 )

Firefox3 and Genshi trouble

Written on 2008-10-21 09:32.

A few weeks ago, I finally upgraded my laptop to Ubuntu Hardy (8.04). I had already upgraded my Desktop computer on the day of the release but given the numerous issues I had with the new version, I didn't switch my laptop (on which I work) yet. In my opinion, this was one the single most problematic release of Ubuntu ever (and I've been an Ubuntu user since its very first release). Since I had not seen any issue with my desktop computer for a while, and that I wanted firefox 3 (mainly for its increased javascript execution speed), I've given the current version a spin.

The upgrade went quite smoothly. I only wish the upgrade manager asked all questions (mostly about changes in system config files, most of them I didn't even do myself) at the beginning then work in the background without interrupting me.

Now with the actual title of this post... So, after the switch to Firefox 3, I soon discovered that one javascript application I'm working on (the client for OpenHexperience) didn't work anymore. I had a blank page, that's it. No error whatsoever. I soon found out that my javascript code wasn't called at all. Inline javascript worked fine but any code included in an external file was just silently ignored. After 3 hours of hair-pulling debugging, I finally understood the issue. It turns out it was Firefox 3's new pickiness at closing tags. It didn't like the way my script tag was closed in my simple html (not xhtml) bootstrap page.

<script type="text/javascript" src="/script/ohxp.js"/>

It wants an explicit closing tag, as in:

<script type="text/javascript" src="/script/ohxp.js"></script>

I'm all for respecting standards, and I've often bitched at IE for accepting totally invalid markup, but hell, introducing such a change without any error anywhere is almost a crime to humanity.

Now, what made this issue especially hard to debug was that I tried the correct version in my template very early in my debugging process, but it didn't fix my problem, leading me to search elsewhere. The culprit here was my memory... I completely forgot Genshi serialized to xml by default, and diligently replaced the empty script tag (with the explicit closing tag) by the shortcut syntax for empty tags... Exactly what Firefox doesn't want. As is often the case, once understood, fixing this issue was dead simple. One of the possible solutions is simply to tell Genshi to serialize to html, by changing:

return tmpl.generate(**data).render(doctype="html")

to

return tmpl.generate(**data).render("html", doctype="html")

Spam hunt

Written on 2008-08-14 14:50.

Due to the recent surge of comment spam on Nicolas's blog (160+ in 10 days), I've now implemented the most basic captcha I could think of for posting comments in our blogs. FWIW, I used a text input, instead of the simpler alternatives: a checkbox or a dropdown so that it is unlikely to be bypassed "unintentionally" by random content.

I wonder how long it'll take to get some spam again. I hope it will take a while as I think that even this utterly basic system should keep the spam bots away until a spammer investigate this site in particular, and I guess this shouldn't happen anytime soon (given that we only host our own blogs).

Shell history

Written on 2008-06-26 07:16.

As it was a popular blogger's topic a few month ago, I'll start this blog with a very uninteresting post with some stats about my shell history...

fc -l -10000 | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head

Unfortunately the sample is not large enough to be meaningful and so the result varies greatly from time to time...

Here is the result from my first try (on the beginning of May):

177 nosetests
161 svn
110 vi
109 ls
90 cd
46 python
44 sudo
29 rm
21 ps
18 top

And today:

174 ls
141 sudo
121 cd
117 vi
96 svn
54 nosetests
46 l
27 chmod
24 rgrepv.sh
13 rm
Pages :