Make Gnucash iCal from invoices
Something handy, make an iCal calendar file from your Gnucash datafile, I use this to create a calendar of invoiced day's so i can see if i missed any days for invoicing.
Gnucash datafile is a compressed XML file with a fairly straightforward schema, here we use xml2 command line xml swiss army knife to turn the XML into something we can grep, then use some simple formatting to output to the iCalendar output.
Accepts the gnucash datafile as argument 1, and the output as argument 2.
Saving Drupal CCK node, drupal_execute is a dog, use node_save instead
Interesting benchmark, saving 100 CCK nodes in a loop, nearly 5 seconds difference between drupal_execute method and going straight for node_save, i guess this indicates how much overhead is in the form handling (which is not a bad thing!)
heres the output!
time node object based insert: 0.00971524078067 each average, total 0.981767416 time node drupal_execute based insert: 0.0454754971042 each average, total 5
BitCache distributed storage - distributed it is NOT!!
Thought i'de give the Drupal BitCache module a spin for a new project as it offers all the promises of Content Addressable Storage (CAS).
Yes, OK, so you can use the FileFramework that uses the BitCache module to present CCk fields, but there is still nothing distributed about the BitCache project.
There is no support for memcached for Drupal BitCache (And, more so, why would you want to store blobs in memcached? it does not handle object persistance so well)
SF Eager 340 tyres
Who stocks the oldschool SF Eager 340/330 tyres these days? It's hard to find good 14 inch rubber, i'de love to step up to 15 inch but my gear ratio and cam just dont mix for that kind of action (need a 5 speed).
I love the white writing on the side of the SF Eager 340 Bridgestone tyres, tho they are an old design so i'm not sure how well an old patter like the SF Eager tyre's cope in the wet..
Thanks FOSTERS GROUP for pissing on the ANZAC spirit.
For the record, so google can find it.
Linear Interpolation in C..
Something that's been bugging me for a while, and happy I've finally cracked! there might be a less-expensive way todo it, but seems to work ok for me..
Pretty basic 2D Linear Interpolation, I'm not sure if you would call this piece-meal interpolation or not..
check attachment below for better source too.
double tbl_rpm_to_duty[11][2] =
{
{8600, 15},
{6600, 10},
{6000, 9.0},
{5000, 8.0},
{4500, 20.0},
{4000, 8.0},
{3500, 7},
{3000, 7},
{2000, 6.9},
{1000, 6.5},
{800, 7.5 }
};
/**EB-300BK/ EB-300WH/ EB-300BL TDK headphones suck
TDK EB-300BK, Ok so it was only $13, but yeh, they do suck! If you like the sound of small plastic tinny speakers with a distorted bass sound then these are for you..
(also EB-300BK/ EB-300WH/ EB-300BL are the same apparently)

I miss my Sennheiser's where are they :( wha.
Pushing your content into Drupal's pre-page bootstrapless cache for fast content!
A hindy tip, good if you have something tricky like custom RSS feeds from modules etc, use this to push your content into Drupal's pre-page cache, Takes about 0.02s on a decent server to pull cache from here, instead of 0.200s if you bootstrap drupal (with ACP!) basically, just ripping off the cache code, gzip'ing the content with the right key.. content goes in $output..
global $base_root; $data = gzencode($output, 9, FORCE_GZIP); cache_set($base_root . request_uri(), 'cache_page', $data, CACHE_TEMPORARY, drupal_get_headers());
Dynamic hook_menu results in Drupal, was 5, not in 6!
So you thought, I'll build a set of menu items depending on some database results (Say a menu link for every node of a certain type the user owns).
Dreamhost improve Drupal support a little...
Ok, so basically, they're saying they've added a few modules for the 'one click' install stuff.
From: DreamHost January Newslettery*snip*snip*snip*snip*Subject: DreamHost Newsletter v11.1 January 2009 Date: Mon, 9 Feb 2009 20:46:06 -0800 (PST) (Tue, 15:46 EST)
######################################################################## 5.