Dhwebco - dhwebco.com
General Information:
Latest News:
Continuous Education 26 Jan 2013 | 01:00 pm
There was a time not too long ago when I thought that I had reached the end of my programming career. I thought that I was burned out. I'm young, and I've only been coding professional for less than ...
Moving from WordPress to Hyde 15 Oct 2012 | 01:00 pm
Recently I made the decision to stop running this site on WordPress and start using Hyde, a static-site generator written in Python. I was inspired by Steve Losh's excellent article about moving from ...
Setting PHP Timezone to Match WordPress Timezone 10 Mar 2012 | 10:15 pm
Occasionally I’ve needed to write a WordPress plugin, or add theme functionality, that is time-dependent. One issue that I have run into is that WordPress does not set the default PHP timezone. If you...
WordPress – Modifying Text that Doesn’t Have a Filter (Like Registration Page Labels) 17 Nov 2011 | 03:25 pm
I was recently tasked with changing the labels on the WordPress registration page – specifically, my client wanted to add an asterisk (*) after the labels, to signify that they are required. Unfortuna...
Truncating Text with a Tag in Grails 13 Sep 2011 | 12:42 pm
In a Grails project I’m working on, I needed to display an excerpt of a field, limited to a particular maximum length. I wanted ellipses (…) to show up if the text exceeded the max length. This is how...
Grails Tag for Pretty Date Difference 13 Sep 2011 | 12:38 pm
I’m working on a Grails project right now, and I wanted to be able to display a date in the format “x days ago”, or “in x days”. I looked at the Pretty Date plugin, but it wasn’t exactly what I wanted...
Create an Administrator in WordPress Using phpMyAdmin 5 Aug 2011 | 06:38 pm
I often find myself needing to create an administrator in WordPress using phpMyAdmin. Below is an SQL script that will do that. Just replace the variables at the top with your values, and paste the wh...
Uploading a file with cURL in PHP 13 Apr 2011 | 06:43 pm
Uploading a file with cURL in PHP is simple. There is only one way that it differs from POSTing normal data via cURL, and that is the @ sign. Source code Notes: The important part is “@/tmp/...