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...
View ArticleAddThis 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...
View ArticleUpstream timeout issues with nginX + php-fpm + CodeIgniter + gzip + xdebug on...
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...
View ArticlePHP sendmail 90 second delay on Dotcloud [solved]
For months we have been having upstream timeout issues with our Dotcloud PHP service running nginx and php-fpm. Amongst other causes, we found that after our instances were up for more than a day,...
View Articletwitter bootstrap responsive container with padding and a border
I’m working on a project where I wanted to use the twitter bootstrap responsive css scaffolding, but ran into a bit of a snafu because I needed to add a border and background to the container class. I...
View ArticleFinding your iPad’s UDID for Test Flight
I don’t know what possessed the folks at apple to make it so incredibly difficult to find your iPad’s identifier, aka your iPad’s UDID. Not sure why its not just in the iPad’s about section of the...
View ArticleOpcache issues resolved for symlink based atomic deploys and PHP-FPM
I recently ran into problems with php-fpm and opcache using symbolic links for atomic deploys. The solution was so simple, use $realpath_root instead of $document_root in your fastcgi config. Thank you...
View ArticleRDS snapshot and restore script
A few months ago we needed to automate manual snapshot creation and restore. This is the script I came up with… https://gist.github.com/feedthefire/086799433b472b8d3d9e7e0921554eaf
View ArticleAWS Cloudformation ECS Stack json config with Launch Config, Autoscaling...
A while back, at my company we switched to using Docker and ECS for our application. I wanted a structured way to generate AWS resources and I found that AWS Cloudformation is a great way to do this....
View ArticleAWS Lambda function to set Route53 DNS entries for Autoscaling lifecycle events
Some of our ECS Cluster machines need to have both public and private DNS entries So rather than update Route53 manually (super annoying), we modified the Lambda function we found here:...
View Article
More Pages to Explore .....