Check your line endings!
Tuesday 01/22/2008 – Category: Uncategorized – No Comments
I had a problem with a file today that had a bunch of ^M breaks that was causing the class to not load correctly. if you ever run into a problem with a particular file, check your line endings!
“The different newline conventions often cause text files that have been
transferred between systems of different types to be displayed
incorrectly. For example, files originating on Unix or Apple Macintosh systems may appear as a single long line on a Windows system. Conversely, when viewing a file from a Windows computer on a Unix system, the extra CR may be displayed as ^M at the end of each line or as a second line break.”
[via wikipedia]
Thanks notch8 for narrowing down the problem to a single file. I was going crazy trying to figure out if it was a problem with rails requires and dependencies…
PHP mail
Tuesday 12/18/2007 – Category: Uncategorized – No Comments
How to use the often overlooked fourth parameter while using mail function in php:
bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )
The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.
The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a ‘X-Warning’ header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.
Example usage:
mail($email, $subject, $body, $headers, ‘-fnoreply@mydomain.com’)
When using flvtool2 to trim flv’s…
Friday 12/14/2007 – Category: Uncategorized – No Comments
Use the -a switch to collapse space between cut regions (i.e. resets duration and keyframes from 0)
Rails database migrations for production
Friday 11/30/2007 – Category: Uncategorized – No Comments
To properly rake your database migrations to a production database, use:
rake db:migrate RAILS_ENV=production
Recent Posts
- LED Light for iPhone 4
(Monday 06/28/2010 – Uncategorized – 45 Comments) - WWDC 2010: Worth Every Minute
(Monday 06/14/2010 – Uncategorized – No Comments) - Flickr Original for Safari 5!
(Wednesday 06/9/2010 – Uncategorized – 26 Comments) - iPad thoughts
(Friday 04/2/2010 – Uncategorized – 2 Comments)
