Database table with all the countries, Belgian cities and dropdown with all the countries
Posted on Tuesday 3 March 2009
Below you can download a zip file with SQL dumps of all the countries and another SQL dump with all of the Belgian cities with their postal code, longitude and latitude. I‘ve also included a dropdown with all the countries. I found this on the Snipplr website.
The new safari 4 (beta) browser features
Posted on Wednesday 25 February 2009
Yesterday I installed the safari 4.0 beta. The latest safari version works on windows, as well as mac. There are about a 150 features according to Apple. Some are new, some old.
First obvious changes are the top sites and the new tabs. The UI now has a more windows-like feel to it (in a good way :). It has the look and feel of the chrome browser. Opera and other browsers already had something similar to top sites. Top sites is like a 3D gallery of your most visited websites. It monitors changes in websites since your last visit and marks changes by adding a blue star icon in the right hand corner. That way keeping yourself up-to-date was never easier. Too bad it‘s not as responsive as I‘d want it to be, so I won‘t use it as my start page yet.

The new tabs take a bit of getting used to but gains you about 20px of space because the tabs are on top now. The full-page zoom is a cool feature which allows you to zoom in on a page without any loss of quality of the fonts. Images are being upscaled whilst zooming. Another added feature is the cover flow to browse through your favourites. In my opinion this looks fancy but is quite useless.
Creating views with MySQL instead of filtering out records with SQL
Posted on Wednesday 18 February 2009
I was just reading Pro PHP security and I‘ve learned something very handy. When you‘re, for example using an active field which marks active pages in your table, Instead of including “WHERE active=‘1’” every time you want the get the active pages you can create a view table that filters out these records. In my example, I‘ve used a table ‘pages’ and created a view table ‘pages_view’. My pages table contains these fields:
ID (PK, INT)
title (varchar)
text (varchar)
active (ENUM 0,1)
Difference between hashing and encryption
Posted on Wednesday 18 February 2009
Nowadays no one is trustworthy anymore on the internet. You wouldn‘t want all your private data to be made public when you buy something online now, would you. This calls for security measures. That‘s where encryption and hashing come into play. Both hashing and encryption use an algorithm to transform insecure plaintext information into a secure enciphered format. Both methods use a key to encrypt the data. With hashing the plaintext is the key itself. With encryption the key allows you to decrypt the encrypted data.
How to remove all subversion .svn files and folders
Posted on Tuesday 17 February 2009

Recently my cornerstone (a subversion client) got corrupted and I couldn‘t checkout my working copy. So I had to remove all of the .svn folders and files by hand. A very labour-intensive job if your website consists of about 3000 files.
Terminal to the rescue:
just go to your folder, containing all the subversion files, in the terminal and type in:
find . -name ”.svn” -type d -exec rm -rf {} ;
This will search for all the .svn folders and remove them.
Backup all your databases on your server at once using php
Posted on Monday 16 February 2009

I‘ve altered a php script which I found on the php classes website, to backup all your databases at the touch of a button. The databases have to reside on the same server though. I‘ll change this when I find some spare time. You can download these files below. It includes a folder with a number of files. To use this method of database backup, you first of all have to make a database which contains all your database information like:
- db login (e.g. root)
- db password(e.g. root)
- db host(e.g. localhost)
- db database(e.g. mydatabase)