Disabling that goddamn GTK bell
echo 'gtk-error-bell = 0' >>$HOME/.gtkrc-2.0
Syndicated 2010-09-02 00:03:00 (Updated 2010-09-02 00:04:38) from John Levon
Disabling that goddamn GTK bell
echo 'gtk-error-bell = 0' >>$HOME/.gtkrc-2.0
Syndicated 2010-09-02 00:03:00 (Updated 2010-09-02 00:04:38) from John Levon
Changing liferea keyboard shortcuts
Liferea has no keyboard shortcut editor itself, but "Toggle unread status" demands the wrist-breaking chord action of Control-U. It expects you to be able to edit the shortcuts via the editable menu feature of GTK+.
Unfortunately that's disabled on all modern GNOME installs, and there's no UI for re-enabling it. As usual, gconf-editor to the rescue. The key you need to change is /desktop/gnome/interface/can_change_accels. After re-starting Liferea, you can then edit via hovering over the menu item and pressing the combination. Of course, this in itself is buggy: if it clashes with a menu accelerator (as 'r' is), it will perform that action instead.
It's simpler to directly edit the accels file in your Liferea dot dir.
Syndicated 2010-01-31 17:26:00 (Updated 2010-01-31 17:30:24) from John Levon
Epson all-in-ones: avoid like the plague
Browsing the net, you might get the impression that Epson Stylus All-in-ones are well supported under Linux. Unfortunately this is not the case. The pipslite driver you have to install is extremely flaky, and Fedora SELinux doesn't work properly with it. There's no "draft" mode for some bizarre reason; printing is extremely slow and often randomly cancels half-printed jobs due to USB resets
The scanner doesn't work at all with the iscan software, despite claims to the contrary.
Syndicated 2010-01-26 23:36:00 (Updated 2010-01-26 23:51:30) from John Levon
Setting up JACK on Fedora 12
Audacity is somewhat of a broken joke these days, so I needed to use Ardour to record. And that meant setting up JACK. Since JACK insists on exclusivity, I also needed to route pulseaudio through JACK so I could use other apps at the same time. Unfortunately, this is a bit of a pig to figure out. I hacked it as follows:
First edit /etc/pulse/default.pa, you need to add two lines:
load-module module-jack-sink
load-module module-jack-source
amixer -c 0 sset 'Input Source' 'Line'
nohup jackd -d alsa &
sleep 5
/usr/bin/pulseaudio --start "$@"
Syndicated 2010-01-26 17:28:00 (Updated 2010-01-26 17:46:23) from John Levon
Liferea strict feed validation tip
New versions of Liferea refuse to parse any feed that fails to validate, even for relatively "minor" problems (the libxml2 recovery facility is no longer used; besides, it abandons the rest of the feed when it hits such problems). I don't want to use Google Reader, since I don't like the interface.
Typically bad feeds have things like high-bit chars or bare ampersands. Thankfully, there's a "conversion filter" feature that you can use to work around the bad feeds. On the two bad feeds, I run this filter:
[moz@pent ~]$ cat bin/fix-ampersands
#!/bin/bash
sed 's/\o226/&/g' | sed 's/& /\&/g' | sed 's/\o243/GBP/g'
Syndicated 2010-01-17 16:33:00 (Updated 2010-01-17 17:08:35) from John Levon
The main indicators of egotism as I intend it here are are loud self-display, insecurity, constant approval-seeking, overinflating one’s accomplishments, touchiness about slights, and territorial twitchiness about one’s expertise. My claim is that egotism is a disease of the incapable, and vanishes or nearly vanishes among the super-capable.
I’m the crippled kid who became a black-belt martial artist and teacher of martial artists. I’ve made the New York Times bestseller list as a writer. You can hardly use a browser, a cellphone, or a game console without relying on my code. I’ve been a session musician on two records. I’ve blown up the software industry once, reinvented the hacker culture twice, and am without doubt one of the dozen most famous geeks alive.
No prizes for guessing who this was.
Syndicated 2009-11-10 16:27:00 (Updated 2009-11-10 16:30:05) from John Levon
A horrible little ElementTree gotcha
What does this print:
from lxml import etree
doc = etree.fromstring('<a><b><c/></b></a>')
newdoc = etree.ElementTree(doc.find('b'))
print newdoc.xpath('/b/c')[0].xpath('/a')
The answer is: [<Element a at 817548c>]. The first point to note is that xpath() against an element is only relative to that element: any absolute XPaths enumerate from the top of the containing tree. The second point is that the shallow copying of etree means that _Element::xpath, unlike _ElementTree::xpath, evaluates absolute paths from the top of the original underlying tree! So even though there's no <a> in newdoc, an absolute XPath on a child element can still reach it.
Yuck.
Syndicated 2009-10-20 15:42:00 (Updated 2009-10-20 15:50:34) from John Levon
YouTube annoyance
How much time would it really take to order multi-part videos, so the suggestion at the end of the video is the next part? Please!
Syndicated 2009-10-19 16:29:00 (Updated 2009-10-19 16:29:51) from John Levon
An annoying Python gotcha
Imagine you have this in mod.py:
import foo
class bar(object):
...
def __del__(self):
foo.cleanup(self.myhandle)
import mod
mybar = bar()
Syndicated 2009-10-10 16:05:00 (Updated 2009-10-10 16:12:43) from John Levon
Kernel solipsism
Thomas Gleixner:
Exactly that's the point. Adding dom0 makes life easier for a group of users who decided to use Xen some time ago, but what Ingo wants is technical improvement of the kernel... The kernel policy always was and still is to accept only those features which have a technical benefit to the code base.
Syndicated 2009-06-04 12:11:00 (Updated 2009-06-04 12:18:44) from John Levon
New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!