stories and code by Patrick Ward

09 Apr 2012 » Using NullDB with MiniTest:Spec and Rails 3.2

Wherein I discuss how I got MiniTest:Spec to work with NullDB

04 Mar 2012 » Recursively chmod Only Directories or Only Files

Another note to self here, to remind me how to recursively chmod (or really perform any action) on directories only.

11 Feb 2012 » A Few Notes on Using Rsync

I've had to work with Rsync recently for several projects that required syncing up code between servers. So, before I forget the little bits of information that I've gleaned in the last few days, here are some notes to remind me and anyone else that might need a refresher.

02 Feb 2012 » Randomizing Javascript Arrays

I needed to randomize a list of images the other day using Coffeescript. So, I investigated a few techniques for doing that.

19 Aug 2011 » How I Use Compass With Rails 3.1

A short, if outdated, summary of my attempts to work with compass on a beta version of Rails 3.1.

17 Aug 2011 » Techniques to Clear Floats in CSS

I ran into the pervavise issue of having to clear a DIV that contains only floated DIV elements in it recently. The problem is that the outer container does not stretch to accomodate the height of it's child containers. So, if you have a background or a border on the containing element, it does not fully cover the child elements. It's an old issue, but I keep forgetting where to find the information on how...

15 Aug 2011 » Understanding Subject in RSpec 2

I needed to write some shared examples in RSpec the other day for a simple ActiveRecord concern I was writing. In doing so, it forced me to understand what RSpec means by the subject of an example. I'll admit this is a very simple concept, but until now I didn't take the time to understand it and the relish docs weren't overly descriptive on how it works. In general, the subject of an example is...

07 Aug 2011 » Installing PHPUnit With MAMP 2.0.1

I needed to install PHPUnit with my local version of MAMP Pro 2.0.1 recently. After starting with this article for ideas, I came up with the following adjusted steps: 1. Create a soft link to the MAMP version of pear: shell ln -s /Applications/MAMP/bin/php/php5.3.6/bin/pear \ /usr/local/bin/pear 2. I found that the default pear.conf file was either corrupt or invalid. Following a forum suggestion on the mamp.info site, I just removed it by renaming...

« Older Posts