Drupal 7 problem: Content edit tab doesn't appear for user editor

In Drupal 7, there is a *very tricky* problem you might fall upon at some point. We did and because it's not *really* a Drupal bug (although it could be considered as a usability bug), it's worth writing down. The problem is simple: one admin (Joe) and two editors (Sam and Max) edit a website. They all create their own content of the type "artist". They all have permissions to "Create artist", "Edit own artist", "Edit all artist" and "Delete artist". Also, the "artist" content type has a text body which can use the "Pure text" format, the "Filtered HTML" format and the "Full HTML".

Prune a Mercurial branch

The manual is perfect for that... http://mercurial.selenic.com/wiki/PruningDeadBranches All you have to do is:
hg heads
Identify the branch you want to close (get the revision number, let's say 951)
hg update -C 951 hg commit --close-branch -m "This version never worked" hg update -C default
Done!

Create a view to search on content title in 7 steps in Drupal 7

I searched for this a long time just to find it was very easy to do, so I hope this helps you too. The objective of this short guide is to explain how to build a view in Drupal 7 that will let you search for part of a title of a specific content. Let's say your site is about music and you have a content type called "Song", which has an artist and a title. Now let's say you want to search on the title and let the user select a search term. It's very easy to get distracted by the "Contextual filters" option.

Creating a software RAID array on an already installed Ubuntu 11.04

Let's say you got confused by a misleading fake-RAID feature on an HP Blade server and you decided to ignore that the Ubuntu installer was telling you it found 2 disks while it was supposed (if it was actual hardware RAID) to be detecting only one. And let's say you are lucky to have 3 disks, and you only one to use two as the RAID array (and they do not contain your operating system, i.e. the / partition). You might wonder: "And now what? S**** you, HP!" (that last bit is if you left panic get you, of course).

Reset mailman admin password

To reset a mailman admin password on Debian, the easiest way is to locate the mailman's proper bin directory (use dpkg -L mailman), generally: /usr/lib/mailman/bin There, you'll find an executable script called change_pw. Use this one. If you want to change the password of all lists at once, use: sudo ./change_pw --all --password=newpassword Ref: http://www.mail-archive.com/mailman-users@python.org/msg34242.html

Increasing battery working time on Lenovo W500

I'm a happy user of a Lenovo W500 but I had a very hard time getting anything more than 1h30 battery time, even with a brand new 9-cell battery (this one got me just 1h45 when using low screen brightness and minimum CPU). Then through a conversation with a friend and colleague, he suggested I disable the ATI graphics card and use the motherboard's... This means disabling it in the system's BIOS (not inside whatever operating system you use). Since I tried that, I get up to 4h45 on my 9-cell (with the minimum energy usage configuration in Ubuntu 10.10 64bit).