Mikko Kortelainen

Checking PostgreSQL Disk Usage

This query sums total disk space used by the table including indexes and toasted data for the 20 largest tables:

SELECT nspname || '.' || relname AS "relation",
    pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
  FROM pg_class C
  LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
  WHERE nspname NOT IN ('pg_catalog', 'information_schema')
    AND …
read more

Apache HTTP authentication against WordPress password database

The stock mod_auth_mysql package in Ubuntu is not able to authenticate against the phpass password hashes stored in the WordPress database.

There seems to be a patch lying around to enable phpass authentication in mod_auth_mysql. Its inclusion in mod_auth_mysql has been requested a long time ago, and again more recently …

read more

Make WordPress Twenty Eleven theme post pages full wide

I wanted to make the indivitual post pages 100% wide, and also the headings a bit bigger. Here's the CSS to do it:

/* Make individual posts full-width */
.singular.page .hentry {padding:1em;}
.singular .entry-header,
.singular .entry-content,
.singular footer.entry-meta,
.singular #comments-title {
 width: 100%;
}
/* Fix the edit button placement */
.singular …
read more
<< Page 9 of 15 >>