Archive for 2007

Scary Docs

Placing your documents online, does require trust in the online service you choose to use. I usually have a pretty solid trust in google. They do however from time to time have some glitches. After getting the message in the screenshot for an hour, I did start to get the chills, as the document as [...]

Should you use sql specific statements?

It seems there are two camps when it comes to SQL and how to do database optimizations – the “generic camp” and “the specialist camp”. While I don’t consider myself an extremist, I am absolutely in the specialist camp and this little post is an explanation of why. SQL is a generic database langauge . [...]

Tags: , ,

CodeZoo

I just discovered O’Reilly CodeZoo today. What a cool idea – ”Find good code, use it quickly”. The net is just littered with bad code samples and finding a place where a high quality standard is set might be a great idea. Only problem is that the (probably) two most used languages on the net [...]

IP address conversion with Perl

With Perl you can do many interesting transformations of IP-numbers. Below is two small examples allowing conversions from “IP quad” (xxx.xxx.xxx.xxx) format to a single decimal and back. The decimal format may be more convenient and efficient to store in a database. sub ip2dec ($) { return unpack N => pack CCCC => split /\./ [...]

Tags: , ,

Gmail filter feature wanted

I’ve been moving a fairly large part of my private mail to my Gmail account.  Gmail do have some amazing features for searching, labeling and handling mail and the virtually unlimited storage is also pretty cool – Much cooler than keeping a huge mail-archive on an IMAP-server or having it on a local fragile hard [...]

The case against tags

To every modern web 2.0 site offering tagging seems to be an absolute requirement. While I may agree, that tagging in some cases may offer some improvements in content navigation over many other points, I do think it’s been too abused in way to may cases. Tags on sites such as Flickr and Del.icio.us are [...]

Tags:

Wanted (source)code plugin for WordPress

The past days I’ve been posting stories with a few code samples – Perl, PHP, Javasscript and/or HTML. While WordPress is fantastic to a number of things, handling sourcecode examples in the posts, reallly isn’t one of them. I’ve been playing with a number of plugins, but none of them really works for me. What [...]

Changing a form submit url with javascript

Sometimes you might need to change the address a form submits to, it’s quite easy with javascript. One example could be if you – like me – from time to time is hit hard by comment-spammers. Changing the submit URL on the form with javascript, makes it at least somewhat harder for “automated brainless robots” [...]

Bulk resizing images with Perl

Suppose you’ve just filled you digital camera with an endless stream of photos. You want to place them online at your website, but placing 5+ megapixel files online, well…probably a bad idea. Let’s resize them to a propper size – and why not use Perl and ImageMagick for the job.  Not a problem, here’s a [...]

Tags:

Syntax checking PHP on the commandline

I’m sure most people only thing of PHP as a Weblanguage due to be called through a browser. It has however since version 4.3.0 also been possible to use PHP on the commandline – as you do with Perl, Shell scripts and likewise. If you’re using Linux (or an other Unix-like operating system – including [...]

Tags: