Monthly Archive for January, 2006

Am I a Geek?

On of those silly quizzes told me I’m definitely a geek, but my other half and a friend told me the other day I wasn’t. So am I or not? It’s a very serious issue!

A geek (pronounciation /gi:k/ ) is a person who is fascinated, perhaps obsessively, by obscure or very specific areas of knowledge and imagination. Geek may not always have the same meaning as the term nerd…

http://en.wikipedia.org/wiki/Geek

I’m not sure if I’m fascinated in anyway by any areas of knowledge and imagination. I’m interested, intrigued and enthusiastic, but fascinated might be too strong a word…

Wikipedia’s entry for Geek (whose neutrality is currently disputed) has a list of seven other descriptions (there are nine points, but only seven describe the geek). Here are the ones I identify with:

  • A person who is interested in technology, especially computing and new media…
  • A person who has chosen concentration rather than conformity; one who pursues skill (especially technical skill) and imagination, not mainstream social acceptance. Geeks usually have a strong case of neophilia. Most geeks are adept with computers and treat hacker as a term of respect, but not all are hackers themselves…
  • A person with a devotion to something in a way that places him or her outside the mainstream. This could be due to the intensity, depth, or subject of their interest. This definition is very broad, and allows for mathematics geeks, aviation geeks, band geeks, computer geeks, gadget geeks,…
  • …being fascinated with one thing for hours on end…

That’s four out of seven. The ones I don’t identify with are General Electrical Engineering Knowledge, A derogatory term for one with low social skills and A person who swallows live animals, bugs, etc.

Does that make me 57.142857143% geek?

Being British

One of the British national daily newspapers is asking readers “what it means to be British?â€?

Some of the emails are hilarious but this is one from a chap in Switzerland.

“Being British is about driving in a German car to an Irish pub for a Belgian beer, and then traveling home, grabbing an Indian curry or a Turkish kebab on the way, to sit on Swedish furniture and watch American shows on a Japanese TV.

And the most British thing of all? Suspicion of anything foreign “.

MySQL Backup Script

There are oh-so-many of these on the web, so I thought I’d add another. I got inspirations from two sources, and here’s my version.

#!/bin/bash
# MYSQL Backup Script
#
# Creates:
# $BACKUP_PATH/
# '-- yyyy-mm-dd/
#   |-- database_name.sql       Full database backup
#   `-- database_name/
#     |-- table1.sql            Individual database table backup
#     |-- table2.sql            Individual database table backup
#     |-- table3.sql            Individual database table backup
#     `-- table4.sql            Individual database table backup

###########################
# CONFIG
########
MYSQL="$(which mysql)"
MYSQLDUMP="$(which mysqldump)"
CHOWN="$(which chown)"
CHMOD="$(which chmod)"
TAR="$(which tar)"
DATE=$(date +"%Y-%m-%d")
BACKUP_PATH="/var/backups/mysql"

#Create database dump directory and go there
mkdir -p $BACKUP_PATH/$DATE
pushd $BACKUP_PATH >> /dev/null

# Loop through each database
for database in `echo "show databases" | $MYSQL | grep -v Database`;
do
        mkdir -p $DATE/$database

        # Dump database
        $MYSQLDUMP --defaults-file=/root/.my.cnf --add-drop-table --allow-keywords -a -a -c $database > $DATE/$database.sql

        # Loop through each table
        for table in `echo "use $database; show tables" | $MYSQL $database | grep -v Tables_in_`;
        do

                # Dumping table
                $MYSQLDUMP --defaults-file=/root/.my.cnf --add-drop-table --allow-keywords -q -a -c $database $table > $DATE/$database/$table.sql

        done

done

# Create daily archive
$TAR jcf $DATE.tar.bz $DATE

# Ensure only root can access these files
$CHOWN 0.0 -R $DATE
$CHOWN 0.0 $DATE.tar.bz
$CHMOD go-rwx $DATE
$CHMOD go-rwx $DATE.tar.bz
$CHMOD go-rwx -R $DATE/*

# Back to start directory
popd >> /dev/null

I was going to go to the extent of using `which` to find the location of grep and echo, but thought it unnecessary. Makes me wonder, should we use `which` to find which??

OSGERMS renders a page

I’m very excited today. I just got OSGERMS to a point where a default install renders a page! Woohoo.

Okay, so it only says “Hello”, but it’s a start. The system is separated into a share and docroot directory, where the docroot contains a symlink to the index.php in the share directory, and deployment specific files (currently only the template files).

The share directory contains the meat of the system, all completely OO (except for an error handler, convenient p() function for printing debug info and the __autoload function).

Anyway, it’s after 6 o’clock, and I’ve been fighting to get this done by the end of today. It’s all checked in if you’re interested in looking at it…

I’m off to the Melbourne PHP User Group committee meeting now. I’ll write more on this soon. Even if you’re not that interested :-)

PHP Training Australia web site launched

PHP Training Australia launches its website, just minutes after launching its first clients site.

Yes folks, the wheels are moving. We’ve designed a few modules and are about ready to give our first course. There’s probably another week’s work to do, and then we’ll announce the first course date, hopefully to be mid to end February.

Check out the PHP Training Australia web site. A subscription system will be available soon to be kept up-to-date on new courses and events.