Drupal: Programmatically installing and enabling modules in the .install file (September 15, 2008, 5) - To make configuration management easier, we decided to make sure that all behavior-related changes are in the source code repository. So when I needed to add the reCAPTCHA module to the project, I needed to figure out how to programmatically install and enable the module with update code in another module’s .install file.
Here is some
Drupal, Emacs, and templates: Module update functions (August 6, 2008, 2) - Drupal’s coding conventions make it easier to hook into system behavior, but they also result in a lot of repetitive typing. For example, you can run code when upgrading a module by putting the code in a function named modulename_update_N() in your module’s install file. I found myself scrolling up and copy-pasting stuff too many
Using supervisord for Nginx+FastCGI+PHP (June 23, 2010, 8) - I was having problems with spawn-fcgi-standalone occasionally resulting in dead PHP processes, which caused 502 Bad Gateway errors on my site. Crontabbing an /etc/init.d/init-fastcgi start didn’t help much, so I looked for other ways to do it. Supervisord looked promising.
Here’s how to get Supervisord:
apt-get install python-setuptools
Here’s what to add to /etc/supervisord.conf:
So far, so
Setting up Ruby on Rails on a Redhat Enterprise Linux Rackspace Cloud Server (April 4, 2011, 4) - 1. Compile Ruby from source.
First, install all the libraries you’ll need to compile Ruby.
yum install gcc zlib libxml2-devel
yum install gcc
yum install zlib
yum install zlib-devel
yum install openssl
yum install openssl-devel
My particular application has problems with Ruby 1.9.2, so I compiled Ruby 1.8.7 instead. This can be downloaded from ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz
Emacs and PHP: On-the-fly syntax checking with Flymake (July 31, 2008, 12) - The dreaded white screen of nothingness usually means that I’ve misplaced a quotation mark or brace somewhere in my PHP code. On-the-fly syntax checking in Eclipse helped me find those errors quickly because I could scan the right scrollbar for areas marked with red. I knew that shifting to Emacs wouldn’t automatically cure me of