Connect to Postgres on Heroku using DATABASE_URL Config Var with PHP and PDO
Unfortunately PHP's PDO constructor doesn't take a database connection url (in a format that Heroku makes available as a config var) as an argument. It has its own, rather odd syntax.
However, it's easy enough to extract url parts with the `parse_url`...
Written by Sean Behan on 11/10/2017
Deploying Wordpress on Heroku
> This post is out of date - Heroku officially supports PHP now w/ buildpacks
Heroku runs
Apache version 2.2.22
PHP version 5.3.10
Deploying Wordpress to Heroku requires that you throw the Wordpress source into a Git repository. So download th...
Written by Sean Behan on 03/02/2017
Installing Ruby on Rails 3, MySQL, Git, Ruby Enterprise Edition, Passenger (Mod_Rails) on Ubuntu with Rackspace Cloud.
Short and sweet. Here all the commands I run in this order to set up a brand new box. It usually takes about 10 - 15 minutes on a 256 MB RAM instance. Compiling Ruby Enterprise Edition, which is super easy, will take the most amount of time. It will seem ...
Written by Sean Behan on 06/17/2012
Defining Application Constants for Ruby on Rails Application
The best place to keep application constants which are environment specific is in config/environments directory. For instance...
# in RAILS_ROOT/config/environments/development.rb
APP_DOMAIN = "localhost"
# in RAILS_ROOT/config/environments/production.rb...
Written by Sean Behan on 06/17/2012