Basic template for WordPress

I recreated my site recently and moved the custom PHP and WordPress code to a central WordPress code base. I had to recreate some files in the template to get the site to behave the way I wanted it. This is the list of changed files in a WordPress template.

404.php comments.php content-page.php footer.php header.php index.php page.php sidebar.php single.php

Of course you’ll have to add the style.css file and include custom Javascript and CSS filesRead more.

New design

I thought it was time for a new design of this website. The old setup was a combination of my own code with a WordPress blog. I now moved everything to WordPress with a custom theme and some template coding.

The old site used to look like this :

This site uses Google Fonts so you might want to turn on Javascript for all visual effects.

Use ONLY_FULL_GROUP_BY with WordPress

Something I came across recently when installing WordPress gave me headaches. Everything seemed to work properly except when selecting posts by category no results were returned.

I debugged the problem by looking at the SQL-queries performed by WordPress. One query returned an error :

Because the MySQL server was configured to honor ONLY_FULL_GROUP_BY it gave the error “‘test.wpposts.post_author’ isn’t in GROUP BY”.

I could not disable ONLY_FULL_GROUP_BY serverwide so I had to insert it inRead more.

Lookup external IP

If you are behind a router or gateway and you need to get your public IP then you can use dyndns.org with this wget line:

Parse logfiles for entries from IP lists

I sometimes have to parse log files for different IP addresses and then group them by network owner. This becomes tedious If the number of IP addresses is rather long. The script below can help with automating this manual task.

It reads a log file and looks for a match based on keys in an iplist. Afterwards the result is summarized and grouped by a specified field. For example, say you have the log fileRead more.

Phishing notice from Deutsche Bank

A couple of days back I received an e-mail from Deutsche Bank. I’m not a customer from DB. About a year ago I applied for some information and I guess my email addresses ended up in their mailinglist.

The mailing warns customers that there is a phishing attack ongoing. According to the mail, once infected, a virus on your computer lures you to a fake page where you are asked to enter your details.

SoRead more.

The Complete Guide to XSS

There is a good writeup on XSS on Security Override.

nmap XML to HTML parser

I was recently in need for a parser that would convert Nmap XML output to a HTML file. As far as I could see there was no tool available so I wrote my own. Feel free to use or adjust it.

Play .iso on mac os x

A short post as a reminder, this is how to open iso dvd files on a Mac with OS X Leopard.

Open the Finder and navigate to the .iso file, double-click to mount it. Then go to Applications and open the DVD player.

Screws removed from my jaw

About 6 months ago I had a rather unpleasant accident and broke my jaw.

Last Thursday I had surgery to remove the metal plates that held my jaw together. I went in around 9AM, had a good sleep between 1PM and 3PM and went back home around 6PM … with the things that were inside my cheek in a small plastic back.

The doctor told me I was rather fortunate, I managed to crackRead more.