I’ve been trying out Thunderbird every once in a while, but I always ended up going back to Evolution because certain folders wouldn’t display.
Today I finally found the bug that explained why — turns out I just needed to lower the number of connections it tries to use on the IMAP server.
Two sets of mozilla pref settings that can speed up layout times and network responsiveness. (They did for me anyway. YMMV.)
My primary hard drive began to fail yesterday - making pinging noises, then crashes, then refusing to boot w/out appropriate religious iconography present, etc., so I decided to try and clone it to a new hard drive. That I’m using Linux (Gentoo specifically) made this easier then I expected [1]. Here’s what I did:
cfdisk/clone - mount /dev/hdb3 /clonersync -va --exclude=/proc/* --exclude=/dev/* --exclude=/boot/* --exclude=/clone/* --exclude=/tmp/* / /cloneboot partitiongrub to install MBR on new hard drive1 Ok, it’s probably not all that difficult for other operating systems given proper software, but it was cheap ‘n easy.
And they’ll tell you a more obscure way to do it. My perl contribution is shamefully unterseified, here it is without all those wasteful variables:
perl -MLWP::UserAgent -e 'LWP::UserAgent->new->request( HTTP::Request->new(GET=>"http://slashdot.org/"))->headers->scan( sub {print "$1: $_[1]\n" if $_[0] =~ /X-(Bender|Fry)/;});'
J2SE 1.5 Beta - 1.5 in a Nutshell, new features.
Two upcoming releases to look forward to: Firebird 0.8 (Monday) and Mozbot 2.6 (“in a few weeks”).
Bookmarklets are a cool way to make producer/editors of your site very happy very easily. Most medium to large web sites have a web based editing system. For example, if it’s a site with articles, you might have:
http://www.example.com/article/story.tla?id=1234
and there will be a corresponding edit page for this article:
http://internal-site.example.com/edit/edit.tla?storyid=1234
If editors are browsing the public site and want to edit the article, they then have to go into the editing interface and (depending on the hostility level of the editing interface) enter the id for the article, or browse through a category system, or do a search, etc. Wouldn’t it be great if they could jump to the editing screen with the click of a button?
Enter bookmarklets. Bookmarklets are essentially chunks of javascript that are executed when you click on a browser bookmark. For example, if you create a new bookmark and enter this for the location:
javascript:alert('Hi there!');
when you click on that bookmark, you’ll get a javascript pop-up saying “Hi there!”. You can put this chunk of javascript into an anchor tag that you can then put on a webpage. People can drag this link to their Links toolbar (in IE) or personal toolbar (mozilla, etc.):
<a href=”javascript:alert(‘Hi there!’);”>Hi!</a>
becomes:
So, you’ll probably see that it’s a simple matter of a regular expression to grab the id from the public site URL and send the user to the edit page. Let’s look at how we might do this:
u=window.location.href;u.match(/id=([^&]*)/); - an alternative regexp here if you know ids are always digits would be /id=(\d*)/. An important consideration is to not grab too much (e.g., if our URL query string was id=1234§ion=news, the regexp /id=(.*)/ would be bad.) [Special Bonus Problem: what if your query string has something like: sid=4567§ion=news&id=1234 ?]location.href='http://internal-site.example.com/edit/edit.tla?storyid='+RegExp.$1; (Javascript regexps put match values (i.e., the bit we captured with ([^&]*)) in the variable RegExp.$#)That’s it! Putting it all together we get:
javascript:u=window.location.href;u.match(/id=([^&]*)/);
location.href='http://internal-site.example.com/edit/edit.tla?storyid='+RegExp.$1;
Now, let’s suppose we want to make the bookmarklets a little friendlier - what happens if the editor clicks the bookmarklet when they’re on a page without an id? They’re likely going to get an error page, which isn’t very helpful. It’s pretty easy to create an alert box if our match was unsuccessful.
First, we’ll need to save the result from our match attempt: id=u.match(/id=([^&]*)/);.
Second, we’ll check to see if id is null. If it isn’t, the user goes to the edit page, otherwise they get an alert:
if(id!=null){location.href='http://internal-site.example.com/edit/edit.tla?storyid='+RegExp.$1;}else{alert('No story id found');}
That’s it! Final result:
javascript:u=window.location.href;id=u.match(/id=([^&]*)/);
if(id!=null){location.href='http://internal-site.example.com/edit/edit.tla?storyid='+RegExp.$1;}
else{alert('No story id found');}
If your regexp needs are more complicated then presented here, try this article. You can also find many cool (and much more complex) bookmarklets here.