How to Handle Uploading Really Large Files in PHP
PHP has some default limits that do not work out of the box when you want to work with uploading very large files.
So there are a few configuration changes you have to make to the defaults that come with PHP. These are defined in you php.ini file.
Change the Default Controller Name in Rails Functional Tests
Rails will infer the controller you want to test from the class name of the test case. For example...
class PeopleControllerTest < ActionController::TestCase
will test the app/controllers/people_controller.rb.
To change this is trivial. Us...
How To Increase or Change the File Upload Size in the PHP ini file for Wordpress
You need to find which configuration ini file has been loaded by PHP. The easiest way to do this is to run the phpinfo() function from the command line.
php -r "phpinfo(); " | grep -i "loaded configuration file"
You should see something like...
Deploying Wordpress on Heroku
> This post is out of date - Heroku officially supports PHP now w/ buildpacks
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...
How to Add Additional Sub Directories to the Default Rails Test:Unit File Structure
# Edit Rakefile in project root
# Add a new rake test task... E.g., rake test:lib, below everything else in that file...
# Alternatively, add a task in lib/tasks/ directory and plop in the same code
namespace :test do
desc "Test lib source"
How to Copy and Paste to/from the Global Register with Tmux on Mac OS X
Using the system clipboard with tmux on OS X is broken. I really like tmux but having copy and paste is kind of important for me. Here is my attempt to get it back with a simple bash script until I find something better. The approach is to take a named pi...
Deploying to Dreamhost
Remember to include the host declaration in the database.yml file when you deploy to Dreamhost. Dreamhost does not use "localhost" which is typically the default setting when using the mysql adapter and developing locally or even on a small site.
Using sendmail to send mail on ubuntu box
I normally install postfix for my MTA. However, I've never really used sendmail so I'd decide to give it a whirl for a new application I'm working on. I don't use it for anything but handling the mail that the application needs to send out, like new user ...
Postfix, ActionMailer and OpenSSL Fix on Ubuntu
If you run into problems using ActionMailer > 2.2, Postfix and OpenSSL while sending mail from your application, try changing the following:
OpenSSL support with Postfix does ...
Sample Rails Database Config for MySQL
Sample Ruby on Rails database config file for connecting to mysql.
#socket: /tmp/mysql.sock #this may vary