MySQL: Show count of records in each table of a database

December 12, 2012

I recently did a dump of my database on this site and it was almost 300 megabytes! That is pretty huge for a simple personal site. Curious as to where all that data was hiding I whipped up a quick SQL query that calculates the total number of rows per table in a single database.

PHP: Find a file within a given path

December 12, 2012

If you need to locate a file somewhere within a given path this code snipped will do it for you. Please note that it only works on files systems that can handle the Linux style architecture. This means that the code will likely not work on a Windows Server. I created this snippet specifically to

Turn email ( SMTP ) back on in OS X Mountain Lion

November 8, 2012

I upgraded to Mountain Lion a few days ago and I have to say that I have had several major disappointments. Overall it is great. Still pretty, faster than Lion, and I have not experienced the battery drain issues that have plagued some users. What I have noticed is that most of my standard, every

WordPress: Customizing the toolbar on your wp_editor()

October 29, 2012

Have you ever wanted to customize what toolbar buttons are shown on your TinyMCE wp_editor() instance? I was digging around the WordPress core and found a neat filter called teeny_mce_buttons. This filter passes in an array of button names that you can alter by adding and removing buttons you need. There is a pretty large

WordPress: Remove image from content on post save

October 28, 2012

If you have a post type where you want to allow the user to utilize the built in content box, but you do not want the user to be able to save images there is a quick trick you can use to strip image tags away before the content is saved to the database. This