Loading Javascript Libraries When Needed

June 23rd, 2008

Here is a nice little Javascript function to load some Javascript libraries:

function includeLibs()
{
var libs = [{object: 'Prototype', src: 'http://www.mobypicture.com/slideshow/prototype.js'}, {object: 'Lightbox', src: 'http://www.mobypicture.com/slideshow/lightbox.js'}];
for (var k = 0; k < libs.length; k++)
{
try
{
var obj = eval(libs[k].object);
}
catch (err)
{
var obj = false;
}
if (obj == false)
{
var newjs=document.createElement('script');
newjs.type='text/javascript';
newjs.src=libs[k].src;
document.getElementsByTagName('head')[0].appendChild(newjs);
}
}
}

This is particularly useful if you’re writing a widget that requires external libraries but the user might already have them loaded, such as Prototype.

Multilink

June 21st, 2008

Multilink is a very simple Javascript library that creates tooltips with multiple links per ‘normal’ link, its simplicity due to Prototip2 and Prototype. Why have one link when you can have ten! Check out the Multilink page for an example.

Repairing SVN Working Copies

May 30th, 2008

Unfortunately an all too common problem with Subversion is accidentally deleting the .svn directory used to track changes on a working copy. The accepted solution seems to be to check out to somewhere else the directory to which .svn belongs and then copy the new .svn directory into where the working copy’s should have been.

I wrote the following bash script to automate this repair process:

#!/bin/bash

if [ "$1" == "help" ]; then
  echo "Useage: svnrepair repository_dir local_dir"
  exit 1;
fi

if [ -n $1 ] || [ "$1" == "." ]; then
  repo_dir=`svn info | awk '/URL: (.*?)/ {print $2}'`
else
  repo_dir=$1
fi

if [ -n $2 ] || [ $2 == "." ]; then
  local_dir=`pwd`
else
  local_dir=$2
fi

svn co $repo_dir delme; cp -r delme/.svn $local_dir; rm -rf delme

From the Laboratory: Closed Standards

May 27th, 2008

Closed standards are an oxymoron and any standard that is closed is moronic.

This is going to be a rant, so bear with me….

How can you call anything a standard when you don’t make the standard readily available? What is the point of a standard that no one can implement? Unfortunately, many ’standardized’ audio and video codecs are encumbered by patents, trademarks, and obscenely expensive reference documents. Surprise, surprise, but many of the telco standards bodies are the worst offenders! (As an aside, the movie people, thanks to MPEG, seem to be somewhat more sensible).

Read more »

From the Laboratory: IP2FireEagle

May 23rd, 2008

IP2FireEagle is small PHP script I wrote which will update your location in Yahoo Fire Eagle based upon your current IP address. You can find more information on the IP2FireEagle page.

BarCamps

April 11th, 2008

I apologize for writing this after the fact, but last Saturday I was proud to host BarCamp Amsterdam IV at my office. The event was a fabulous success, with people from six countries (Netherlands, Belgium, UK, Sweden, Finland, and Romania) attending, including several startup founders who had presented at The Next Web Conference. Building on that success, I will be hosting a Health 2.0 BarCamp tomorrow and BarCamp NLGovWeb in June.

And for those who don’t know what a BarCamp is, it is an ‘unconference’ where attendees make the schedule and everyone is encouraged to participate in presentations. I highly recommend attending one, so if you’re free, come by tomorrow or in June!

Startups In The Netherlands?

April 10th, 2008

Yes, there are startups in the Netherlands, as proven by the many in attendance at The Next Web last week. I’ve been gathering a list over the last month, and I now how a list of almost 40 companies. I’ll admit that CrunchBase coming to Europe has also forced my hand. So please, check it out and tell me who I’ve missed!

From the Laboratory: Image Resizing and Thumbnail Creation

February 24th, 2008

This is the first in a series of posts on technical issues related to web site development and making user-friendly websites. These will focus on the technical details of developing web sites and applications so will probably be interesting to only a subset of readers. Within the next few months, time permitting, we will be launching a new section of the site called Bubble Foundry Labs, where you will be able to find both technical articles and experimental web applications. For non-technical types, these demo applications may prove easier to understand than this article series.

Read more »

Honderdhandigen Party

January 22nd, 2008

I rent my office in the Volkskrantgebouw as part of the Honderdhandigen group. We are having an opening party on February 1 and I invite anyone interested in the building to come by and check it out. With Lunch 2.0 at eBuddy at noon, I’ve got most of your day planned out for you!

Honderdhandigen Flyer

First Lunch 2.0.nl A Success

January 21st, 2008

Thank you to everyone who came to the first Lunch 2.0.nl last Friday at Hyves. We had a great turnout and I think we are at the start of something good. To see more, I am uploading some photos to Flickr, as have many others. Merieke Hensel videotaped the Hyves presentations.

PS My apologies to anyone who tried to email me at peter@lunch20.nl on Friday afternoon. The address is working now.