Author Archives:
Upstream timeout issues with nginX + php-fpm + CodeIgniter + gzip + xdebug on DotCloud – [resolved]
We have been using DotCloud as our hosting platform for months now, and overall I have been extremely pleased with their service. There were some bumps in the road early on while they were still in their beta phase, but things have been running very smoothly for a few months now. Everything except an uncomfortable [...]
AddThis Pintrest button hack to look better in 32×32 format
Today I had to add a Pinterest Share button on our website, and run it through our AddThis account so we can track the analytics. Unfortunately, there are only two options for the Pinterest button via AddThis, neither of which look good along side our 32×32 style share buttons. So, I decided to hack it [...]
mongodb geospatial query example in php with distance radius in miles and km
Recently for a project involving 311 reports in New York city, I had to find a speedy way to query over 3 million records within a certain radius of a latitude longitude point. Mysql is slow for this sort of thing, so I decided to try the data set out with Solr. Solr worked great [...]
mysqldump 5.1.36 unable to successfully dump a MySQL database in UTF-8 character encoding issues
Today I had a character encoding problem when importing some data from a mysqldump from a contractor we had hired to do some work. Everything about the dump was fine, the database, tables, and fields were all using utf8_unicode_ci utf8 collation, the dump file was encoded in utf8, and the database I was importing to [...]
disable firefox native inspect element context menu
With the latest update of Firefox to version 10.0, they included some new developer tools which are similar to what is available via Firebug or WebKit’s developer tools. About time! Unfortunately, I still am so used to firebug that will continue using it instead of these new native development tools. One thing that really grinds [...]
php mysql collation change script
There are times when we get stuck with bad collations on our mysql tables and we are overwhelmed by having to change them by hand. Well, I have written a php script which will go through all your tables and fields in a database and update them to the collation which works for you. In [...]
MySQL alter table to re-order columns
Sometimes because of my completely anal nature, I want the fields that I’ve already added to a table in MySQL to be in a different order. To do this you can simply alter that table column, without changing any of its properties, then adding “AFTER column_3″. So for instance you had a table like this: [...]
CSS3 dual background glow highlight button
I have been working on a new UI at work and decided to go full on with it in HTML5 and CSS3 because its 98% for internal company users who all use a “modern browser” and I don’t have to worry about those pesky IE users. The following code is for a cool looking glow [...]
php imagick complex gradient composite image
Manipulating images with imagemagick for php can be difficult, especially when you are trying to create complex images for a web template. Here is a more complex example of how to create sweet dynamic web graphics. This is a version of a header image that I created for a template design. It involves 4 colors, [...]
simple but useful php base object for mysql table interaction
I started a project creating an online game which involved lots of objects and tables. Rather than rewrite the same code over and over, I decided to create a base object in which i could simple extend the base object to work with any mySQL table by simply listing all the fields. Here is the [...]


You don’t say?