McItaly: gone there, eaten that

I’m not a fan of McDonalds. I don’t really like Ronald, CJ and all the family, but when Ipazia pointed me to new McItaly burger and Guardian’s controversial article on Italian government being involved in the agreement between McDonalds and Italian food companies, I decided to forget stereotypes for a day and try the product. All in all — I thought — criticism should be based on facts, not just McDonalds is crap fud.

So here is the proof:


Read More »

Posted in Rants, Zeitgeist | Tagged , , , , , , | 1 Comment

LUKS mermaids of remote unlock

Recently, I’ve browsed several how-to’s regarding the possibility of unlocking a LUKS root volume remotely using an SSH connection. For reference, the first of its kind is the one for Debian, published at Some of these how-to’s were posted to forums and mailing-lists and received many thankful comments from sysadmins wondering how to make their encrypted secure setup also easy to administrate.

The problem with their approach is simple: they asked how to fix their setup, but forgot to ask what they’re trying to protect. Having your root filesystem on an encrypted disk doesn’t protect you from remote exploitation or credential leaks. It just protects you from the risk of someone being able to access your machine locally and steal your data, or just steal the whole machine altogether. Now, if I were an attacker having access to your hardware locally, I could easily setup a trap for you in less than 5 minutes:

Read More »

Posted in Rants, Sysadmin | Tagged , , , , , , , | 6 Comments

Using screen as your login shell

GNU screen is a nice utility that allows running multiple interactive shells from the same terminal session and allows you to detach from your terminal while keeping those shells alive. Later on, you can re-attach to your background screen to get back to your shells. It has a lot more features like automatic session logging and terminal window splitting. You can discover them all in the manual.

How many times did you start a long-running task like gcc compilation on a remote server and then suddenly needed to disconnect from your shell? Maybe you just needed to move to some other place with your laptop, but if you disconnected from your LAN, your ssh connection would go down. How many times you thought “Damn, if I had launched screen before this…”?

Read More »

Posted in Sysadmin, Tips | Tagged , , , | 8 Comments

Integrate Tornado in Django

Tornado is a nice python WSGI-compliant web server developed by guys at FriendFeed. It’s primarily thought as application server for python web frameworks and according to FriendFeed benchmarks, it’s blazing fast thanks to its non-blocking connections.

UPDATE: For more performance info, James Abley pointed me to a very complete benchmark of available Python asynchronous webservers. It looks like Tornado is a real monster of concurrency.

There are already some how-to’s on the web on plugging Django web framework into Tornado webserver. A quick recap:

  1. A tutorial on Tornado, Django and nginx by Jeremy Bowers.
  2. How to import django framework inside a Tornado project by Lincoln Loop.
  3. A snippet by lawgon.

My approach is slightly different as I wanted to run Tornado using Django management command-line interface.

Read More »

Posted in Coding, How-tos | Tagged , , , , , | 15 Comments

Church vs Hi-Tech head-to-head

If you’re fond of Amiga-vs-PC and Android-vs-iPhone religion wars, you may enjoy this useful recap of what’s going on in the mass mind control department:

  1. Church business is about showing off symbols.
    Technology has its own symbols too.
  2. Jesus wants you to keep vegetables vegetatives alive.
    Technology has found a way to talk to them too.
  3. For centuries, Church stated that Earth was flat.
    Now Technology may prove that the whole Universe is flat too.
  4. Tech spreads ideas through the world-wide web.
    But Church is catching up fast.
  5. Church fears that Tech may lead to atheism.
    In fact, people typically pray God when they need to restore a backup.
  6. Child pornography audience has rapidly moved to P2P technology.
    So Church is making clear that traditional methods work fine too.
  7. In China, Church is controlled by the government.
    In China, IT leader Google reclaims some of its “Don’t be evil” mantra.Jesus in Family Guy
  8. Human clonation, Church warns: «a dangerous experiment which could cause a deep moral crisis».
    Embryons implant operation was most clicked on YouPorn.
  9. Church asserts that human development is explained by intelligent design.
    Scientists may try and open a black-hole to slip in a parallel universe to search for prior art.
  10. According to the Church, marriage should be ’til death.
    Thanks to staminal cells research, your mother-in-law will live forever.
Posted in Funny, Zeitgeist | Tagged , , | Leave a comment

Pre-processing Audio and Video capture to Flash in Mac OS X

Web streaming services like and Livestream (previously known as Mogulus) use a Flash applet to capture audio and video signals on source computer. Media stream is encoded by Flash and sent over to broadcasting server. Currently this approach has two shortcomings:

  1. Flash applet audio capture is very limited: only one device a time, only one stereo channel pair and doesn’t support devices without volume level mixer. It doesn’t allow any advanced setup like multi-channel digital mixers.
  2. Audio and video are encoded on the fly and no local copy is recorded. Streaming services offer server-side recording, but after downsampling and packet loss, quality is very low. Even worse: any connection fault will interrupt your recording.

Read More »

Posted in Audio, How-tos, Video | Tagged , , , , , , , , , | 2 Comments

The Microsoft hotfix tale

A few people on Earth still have a Windows 2000 machine laying around in their lab, mostly schools with severe budget cuts. Some time ago, one of these retro labs had a problem with roaming profiles: apparently Windows 2000 desktop machines refused to sync their profile on logoff. A collegue of mine asked my help to try and fix the issue, so I started debugging user environment using the classic procedure.

What I found out was that machines were configured to access netlogon share and run a VBScript script upon logon, to set a few things like printing shares and stuff like that. Unluckily, Windows 2000 has a problem with this, because if VBScript instantiates a WMI object and uses it to read registry keys, then WMI object is not released correctly and this locks the registry hive and therefore Windows logoff sync aborts after a long wait.

Read More »

Posted in Rants, Sysadmin | Tagged , , , , | Leave a comment

8 web design add-ons for Django

In the last year, I’ve defined a quite stable fundation for my django projects. In this post I’m enumerating template design components that saved my day by reducing development time while keeping code readable, concise and standard-compliant.

1. Blueprint CSS framework

While not a django-specific add-on, Blueprint CSS framework is a perfect companion for django template designers: it features cross-browser style reset, a 24-column grid layout, a nice looking typography and a print-friendly style.

2. django-uni-form

django-uni-form implements UniForm CSS framework in Django: you can render your forms as stylish xhtml-compliant divs using a simple template tag filter and add form layout information to your Form classes.

Read More »

Posted in Coding, Tips | Tagged , , , , | 19 Comments

Linux RAID disk wipeout

A common problem with Linux software RAID (aka md) happens when you try to use a disk that was previously part of some other disk array. Symptoms include: wrong volume size, unable to add device to raid, volume UUID mismatch. To fix the problem you need to use mdadm utility on the disk to cleanup:

# mdadm --zero-superblock devicepath

If you need to apply this fix on a system that doesn’t boot up (for instance when your root volume is on RAID), remember that mdadm and other disk administration utilities are available in Gentoo minimal installation disk.

Read More »

Posted in Sysadmin, Tips | Tagged , , , , | 5 Comments

Yo momma uses Ubuntu

Recently I replaced my mother’s PC, and I thought I could switch her to Linux. She was previously using Windows XP with several Open Source applications (Open Office, Firefox, Thunderbird, etc), so I decided to install Ubuntu 9.10, since it seems that it’s most devoted to non-expert users (she’s over-sixty and not inclined to change her computing habits).

The installation was straightforward and hardware support was really seamless (whew! ACPI works like a charm on new Dells), however I noticed that once the system is running, the “works with clueless user” claim (they call it “alternative to Windows“, but that’s the actual meaning) lasts only five minutes.

Read More »

Posted in Rants, Sysadmin | Tagged , , | 4 Comments