Category Archives: Web Development
We have switched from Apache to Nginx a month ago. PHP is running on FastCGI using PHP-FPM. I have just recently tried to debug our app using FirePHP and got a 502 Bad Gateway response from Nginx. It looks like Nginx by default limits the header output. This is the error in Nginx’s error log: [...]
To integrate libraries using namespaces into a Yii Framework project, you can simply use Yii::setPathOfAlias to have the classes autoloaded by Yii when needed. Just specify the root namespace as the alias and the physical location of that root alias as the path. Using Predis as an example, if we put the code in: /vendors/predis/lib/Predis [...]
This is a pattern we’ve been using to organize a big jQuery project that is now composed of 150+ files. When we first started with the project, we kept all page components in their respective jQuery plugins. This was good enough at that time. But as the project grew it became harder and harder to [...]
To celebrate the New Year, I played a little with Ruby. I made this small Ruby script to download all original image files of PicLyf stored in Amazon S3: #!/usr/bin/env ruby require ‘rubygems’ require ‘aws/s3′ bucket = ‘bucket_name’ AWS::S3::Base.establish_connection!( :access_key_id => ‘our_access_key’, :secret_access_key => ‘our_secret_key’ ) last_key = nil while true do puts “Getting objects [...]
Update Jan 13, 2012: It looks like setting a custom image service is no longer available on Twitter for iPhone. Tweetbot allows it though. This article still works for Tweetbot. For the rest of this article, please treat the text “Twitter for iPhone” as any app that supports custom image services (e.g. Tweetbot). We’ve just [...]
Well, not yet anyway. Perhaps when those hosting prices go down I’d go and take a shot at building something useful. I did start reading a few books on Ruby and Rails. It’s an incredibly awesome and fun language. I’ve never been very excited when learning a new language. I drool when I see Ruby [...]
Remote Editing in Zend Studio for Eclipse has to be one of the biggest reasons why I use it in my current job. I work from home and our team’s development environment is securely setup on a Linux server with a firewall open only to specific IP addresses. This is a no biggie if my [...]
Just found this script from 24 ways which allows your images in PNG format to be transparent in IE6. Very helpful indeed. It’s easy to setup, just copy the code in your source directory and paste the call to the script in your html head.