Category Archives: sql

Postgres tip of the day – show size of all databases

Here is a handy little query to show the size of all the databases on a particular postgres server: SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database; datname | size ————–+——— template1 | 6369 kB template0 | 6361 kB postgres | 6589 kB foo | 55 MB bar | 5129 MB foobar | 85 GB (6 […]

Posted in sql | Comments Off on Postgres tip of the day – show size of all databases

Random featured images in wordpress

I’ve had random header images on the Fedibblety Family blog for quite some time. I originally implemented this by looking for images in a particular directory. However, I had to manually add pictures to this directory, which was a bit cumbersome. I started thinking, why not just select randomly from all the featured images I […]

Posted in php, sql, wordpress | Comments Off on Random featured images in wordpress

Site redesign

I started my website in 2003. At the time it was hosted by the University of Michigan, where I was a graduate student. They gave all students some space for a personal website. It was really great, though it did come with some limitations, like no php or cgi allowed. I managed to kludge some […]

Posted in (x)html, css, php, sql, wordpress | 2 Comments

New WordPress plugin – Image Browser

Today I released my 8th wordpress plugin. This one is quite a bit different from all the other plugins I have written. A friend of mine was looking for a way to create a gallery on his family blog. “No problem!”, I told him, “there are lots of plugins for that”. But I then quickly […]

Posted in photography, php, sql, wordpress | Comments Off on New WordPress plugin – Image Browser

Showing total number of replies in bbpress

For awhile now I have been wanting to show the total number of topics started and replies in a bbpress forum on the profile page. Today I finally figured out how. I like bbpress quite a bit, as it integrates very nicely into wordpress. The main downside of bbpress right now is that the documentation […]

Posted in php, sql | Tagged | Comments Off on Showing total number of replies in bbpress