Tuesday, May 18, 2010

jQuery plugin for a styled scrollbar

jScrollPane from kelvinluck.com
When combined with an accordion plugin or anything that sets the scrollpane to display:none, the scroller gets initialized to height:0, so you don't see anything. Workaround is to wrap the jScrollPane with show and hide like this:
$('#myDiv').show().jScrollPane().hide();
Another way I found is to add it to the click handler for the accordion tab, like so:
$('a.myTab').click(function() {
$('#myScrollWrap').jScrollPane();
});
(discussion of the issue and workaround here)

How to add a Twitter feed to a page

Add Twitter to your blog (step-by-step)
This uses the getTwitters script from twitter.js.

Another way: using jQuery plugin juitter. Code for formatting the timestamp at drupal.org.

How to clone a VirtualBox disk

How-To: Clone or Copy a VirtualBox Virtual Disk

For me, I wanted to convert a .vhd to .vdi, so I did the following:
  1. Created a copy of the .vhd (I'm paranoid).
  2. Changed the UUID of the copy:
    VBoxManage internalcommands sethduuid mycopy.vhd
  3. Cloned the copy into .vdi format:
    VBoxManage clonehd mycopy.vhd mycopy.vdi --format VDI

Tuesday, May 11, 2010

Friday, May 7, 2010

Monday, May 3, 2010