Blog

Migrating inboxes from Dovecot/Sendmail to Dovecot/Postfix

The following tool helped me a great deal in migrating inboxes to a new server : http://perfectmaildir.home-dn.net/
 
What I did was setup the user accounts on the new server, and then copied the users' mailbox files from /var/spool/mail on the old box to a temp folder on the new box.
 
After using

sudo perl -MCPAN - e shell
> install Date::Parse

to setup some pre-reqs for the script, it ran perfectly!
 
 

I just wasted an entire afternoon getting rails running on PostgreSQL!!!

Here are the notes I took during the epic voyage of getting rails + postgresql working on my macbook in case it helps anyone out there...
 
 
#started with
sudo port -v selfupdate

#then started postgres install via macports
sudo port install postgresql84 postgresql84-server
#failed several times, but got it to work after running the 'clean openssl' command and re-running

Ruby on Rails + Paperclip + PlUpload

With a few simple changes you can get plupload to work with an existing paperclip based model/controller in your Ruby On Rails application.
 
Step 1) Modify the plupload initialization from the example on plupload's site - note the comments marked "RoR"
 

Drupal map sites/default to sites/example.com

with terms

If you're developing a Drupal site on your local box that uses a domain specific folder in /sites then you'll probably run into all sorts of problems running the site as http://localhost.  One way to get around this would be to edit your hosts file and setup an alias in apache.  A simpler solution I have found, however, is to simply make a symbolic link from sites/default to the sites/example.com folder.  You can even do this easily on windows now with mklink.

Theme Drupal 6 Search Results

with terms

In drupal 6, the variable $result is available in search-result.tpl.php.  The commented section at the top of this file makes no mention of this variable, so if you want to do something as simple as showing the created date on a node instead of the modified date, then you're in for a bit of researching (unless you read this blog post!).
 
So, if you want to modify how search results are displayed, then you need to:
1) Copy search-results.tpl.php and search-result.tpl.php from /modules/search to your theme's folder.

Google Go (golang) as CGI

The following steps should get you serving content rendered by Google Go through Apache and cgi. This is probably painfully obvious to anyone who has done cgi before, but as I have always worked with higher level stuff, this actually took a little figurin' out.
 
(I'll take a stab at fcgi next...)
 
1) Create plain.go
 

Apache Pivot's Hello World Tutorial in Groovy

with terms

The following is a port of the JavaScript example on http://pivot.apache.org/tutorials/hello-wtkx.html to Groovy.
 
Note : I could not get 
 
def windowOpened(window){
 
to work, so that is why I use a closure instead.
 
 

Bringing CKEditor to Drupal 5

At the moment, there is no pre-packaged way to add CKEditor to Drupal 5.  The following is a result of my attempt to port the Drupal 6 wysiwyg module's CKEditor plugin to the Drupal 5 version.  It's ugly, but accomplishes my goal of getting CKEditor going in D5 without having to create a new module from scratch or try to port the rather large D6 module for CKEditor.
 
Step 1) Create ckeditor.inc (this is based off the D5 version of fckeditor.inc and the D6 version of ckeditor.inc), and place it under wysiwyg/editors
 

WatiN on VSTS

Yes - you can use WatiN and Visual Studio Team System!  Simply create a brand new Unit Test within your project and use WatiN within the test methods.  The only catch is if you get an error that looks like this : 

The location of the file or directory ___ is not trusted.  To resolve this I needed to right click on BOTH WatiN.Core.dll and Interop.SHDocVw.dll and click the "Unblock" button at the bottom.  After that I needed to rebuild my project before the tests would run.

 

Search and Replace in Multiple Files

with terms

Unfortunately I have a client who insists on using 1990's technology for their website and does not want to use a CMS.  This makes tiny little changes to the site take a very long time because every single html file has to be visited and changed.  When I went online to search for an existing search and replace program that would work on multiple files I came across a bunch of programs I either had to pay for or were too shady, so I decided to code up my own app real quick.  The resulting app is attached (source code too).

Syndicate content