Graphics
Bar charts with Drupal's charts module
I started playing with the Drupal charts APIs a while ago, which uses Google's excellent charting APIs. This mostly worked well, except that the bar charts "class" did not support modifying the spacing between groups of bars. So, here's a small patch that solves this.
--- chart.module.orig 2008-12-23 09:53:48.000000000 -0800
+++ chart.module 2008-12-23 09:52:01.000000000 -0800
@@ -549,7 +549,7 @@
// Bar chart bar sizing
case 'chbh':
- $data[$attr] .= implode(',', array($value['#size'], $value['#spacing']));
+ $data[$attr] .= implode(',', array($value['#size'], $value['#spacing'], $value['#group_spacing']));
break;
// Mixed axis positions, labels and styles
@@ -1028,10 +1028,11 @@
*
* @return array
*/
-function chart_bar_size($size = 40, $spacing = 20) {
+function chart_bar_size($size = 40, $spacing = 20, $group_spacing = 30) {
return array(
'#size' => $size,
'#spacing' => $spacing,
+ '#group_spacing' => $group_spacing,
);
}
HTML to PDF
I like to read various web articles on my laptop while I'm traveling, and often there's no network available (like, in the air..). I found this little service that someone in the UK setup, which lets you convert any HTML page to PDF. The URL is http://www.htm2pdf.co.uk/, and I can highly recommend it, it's an easy to use tool to make sure you have enough reading material available even when you are offline.
And I know, there are other ways of doing this conversion, but the service above is so far the easiest to use that I've found. There are also web service APIs available, which are not free, so I haven't had a chance to try them.
Ripping for PSP/iPhone from DVD
These tips make great PSP movies from DVDs
Install and Rip your DVD using dvddecrypter
- Use IFO mode
- Set it to select main movie only, and File Splitting to "none".
- Set it to make 1 VOB.
- Set it to ignore hardware read errors.
Install AutoGK. Some options you'll have to go to the advanced tab for
- use AutoGK to create an AVI from the VOB.
- set width to 400
- Use Xvid
- set quality to 75 to 80 (don't go over 80, it doesn't give you much).
- There are not alot of options.
Convert to MP4 from AVI using PSP Video 9
- Use the 400x192 resolution
- Use the following ffmpeg options -g 300 -sameq
- set for 2 pass
- set audio to 80k to 96k (IMO), Stereo.
- I use a Framerate of 14.985 FPS, and a bitrate of 512kbps (400kbps is also decent).
- If you have a PSP with 2.50 (or later) firmware, maybe consider the AVC video codec, but it takes a lot more space.
- Tweaking the sound volume over 100% might help on the PSP, but I've had little luck with it. I bought a Bostaroo instead, works great.480