tags: linux maverick sony ubuntu vaio
04 Nov 2010 20:21
Recently I updated the Ubuntu I'm using on my laptop to version 10.10 (codename Maverick).
Although things work pretty good, I had to do some tricks to make it work in specific areas.
It seems tpm* modules (who knows what they are for?) break this. Putting file like this:
# With these modules loaded suspend doesn't work
to /etc/modprobe.d/blacklist-tpm.conf (and rebooting) solves the problem for me.
Brightness buttons not working
Run this code in terminal:
while true; do
line=`acpi_listen | head -n 1`;
if echo "$line" | grep 'sony/hotkey SPIC 00000001 00000010'; then
xbacklight -dec 25 -time 0 -steps 1
if echo "$line" | grep 'sony/hotkey SPIC 00000001 00000011'; then
xbacklight -inc 25 -time 0 -steps 1
You need to have smartdimmer and xbacklight package. The keys kind of work now (but quite lamely).
The Ubuntu font is great. I love it. It seems nouveaux driver (for nVidia card) is really good. It supports multi-monitor configuration via xrandr and other standard stuff. Unfortunately you won't get 3D effects (Compiz) with it and you'll need to install nVidia commercial drivers for it.
Consult Sony Vaio SZ Series And Linux for more (mostly old) information.
tags: dev twitter wikidot
18 Oct 2010 20:57
From today on, you can export pages updates to your Twitter account. For each page created a Twitter status update will be posted.
The functionality is called Tweet My Wiki and is available for all Wikidot users (free and Pro).
This feature was coded mostly by me, including the Wikidot URL shortener, that utilizes Redirect module and internal PageSaver API (similar to pages.save_one external API method) to make it all happen.
tags: lighttpd php wikidot xsendfile
01 Oct 2010 18:03
It's not a secret Wikidot uses Lighttpd web server to serve its service. We also use X-Sendfile mechanism to deliver files more intelligently.
Instead of having a PHP process copying file through FastCGI to Lighttpd (which would copy it again to the client) we send a special header to Lighttpd naming the file it should serve to the client. This means PHP processes are terminated quicker, which result in overall better performance.
When working on a Wikidot bug (some uploaded files with some special characters in their names are not accessible using links generated by Wikidot itself), I discovered Wikidot also doesn't serve files whose name end with a space.
The problem disappeared when I (just for test) disabled X-Sendfile mechanism. Pure PHP has no problems in reading such files and sending them through Lighttpd to browser, so it seemed there's a problem with Lighttpd.
Lighttpd v1.4.24 introduced a second X-Sendfile header: X-Sendfile2, which asks Lighttpd to send a chunk of a file (from byte Xth, to Yth), but also a whole file (from byte 0th to the last one). The syntax is:
Where PATH is URL-encoded file path (PHP's rawurlencode, not the non-standard urlencode), RANGE is X-Y (or "0-" for whole file), so changing:
header("X-Sendfile: " . $path);
header("X-Sendfile2: " . rawurlencode($path) . " 0-");
fixes the problem.
27 Aug 2010 21:25
Bikes are very important means of transport in Brussels, see the photos:
I'm posting this mostly because I could not find the squeezed bike on the street lamp photo on Google Maps anymore.