5 Answers For Coder Catchup Episode 100
22 Dec 2016
I was honored to answer 5 questions for Jaymie Jones' 100th episode of Coder Catchup
22 Dec 2016
I was honored to answer 5 questions for Jaymie Jones' 100th episode of Coder Catchup
18 Aug 2015
This ruined my morning.
08 Mar 2015
The reason why I'm bearish on trailing conditionals may best be expressed by a road sign I saw on a recent road trip down Interstate 80
19 Jan 2015
Cody and I recently added a subtle feature to Oma/Sprout that we think is pretty neat.
06 Sep 2014
This is super handy for Heroku-style deploys
20 Jun 2014
4 Steps and an obligatory fake step
04 Dec 2013
Rails 4 defaults the X-Frame-Options header to SAMEORIGIN for security reasons (and good ones at that). However, sometimes you want a specific action to be iframeable. Here's how.
15 Nov 2013
Two handy tools that don't get along out of the box. Herein lies a workaround.
08 Nov 2013
Save yourself a lot of pain down the road by ensuring your system handles crazy input now.
24 Oct 2013
Have you ever needed to see how many times each element in an array occurs? Perhaps sort by those occurrences? Here's a quick and easy way to do it.
02 Aug 2013
So please stop
28 Jul 2013
In case you were wondering
01 Mar 2013
There are many ways to skin the syndicate-a-wordpress-blog-content-in-your-rails-based-app cat. This is an easy one.
19 Feb 2013
We uncovered a Strange Thing when working on Omahype's event listings.
03 Feb 2013
Rack::Throttle is an awesome piece of middleware for rate limiting your app's clients. You can easily extend it to apply any rules you need, such as only limiting certain request types.
01 Feb 2013
The fix to this obscure and nuanced bug after upgrading my Rails-API app to 3.2.11 is worth noting for others.
23 Jan 2013
redis-store's redis-rails is awesome, but it can be a pain in the buttox to get configured on Heroku. Herein lies buttox relief.
07 Jan 2013
There's one thing that almost every web app and web site needs: static pages
18 Dec 2012
Rails' method of sharing data between controllers and views via instance variables bothers many developers, myself included. Here's a handy method you can use to avoid this in your apps.
11 Dec 2012
Poltergeist is a great JavaScript driver for Capybara. Use this helper method to get quick page snapshots to debug your tests.
27 Nov 2012
The arbitrary less-than-15-lines constraint is back, baby! This time, a Domainr CLI
12 Nov 2012
Regular expressions are great for matching many patterns, but they often fall down when dealing with recursive matching. In these cases, there is a simple algorithm that you can use which is more reliable than regular expressions.
19 Oct 2012
Ruby's regular expressions have an idiosyncrasy that can get you in trouble when doing input validation. Find out how to avoid this common gotcha in this post.
23 Jul 2012
Let's not argue about tabs vs. spaces. Let's argue about spaces vs. spaces!
03 Jul 2012
Ruby's popular gem bundling library made dependency management headaches a thing of the past, but it also bundles another feature that has changed my day-to-day life for the better: open
20 May 2012
On episode 54 of the Ruby Rogues podcast, Josh Susser mentioned an interview question he used to use where he would ask the interviewee to reimplement Enumerable's *ect methods (collect, select, reject, and detect) using inject
. In this post I attempt the same thing, but using each_with_object
23 Apr 2012
I spent a weekend building a game with the brand new Meteor JavaScript Framework. Lessons learned and all that.
04 Apr 2012
Adding custom configuration to a Rails app used to be a chore, but now it's dead simple. Here's how.
08 Feb 2012
The title says it all
18 Jul 2011
There are a few different ways to go about building a multi-tenant Rails application. One way that works really well for certain apps is to use PostgreSQL's 'schemas' feature to partition each tenant's data. This article lays out why you might want to build your multi-tenant app this way and how to go about it.
29 Jun 2011
A quick and dirty capistrano task to pull a snapshot of your (PostgreSQL) production database into your development environment.
17 Jun 2011
Heroku's new Cedar stack is awesome for many reasons, one of which is first-class Node.js hosting. I'm giving it a test run with an app that uses Redis for data caching and I couldn't find any documentation on how to connect a Node app to the Redis To Go add-on. Here's how I did it
12 Apr 2011
Pow is the new hotness for serving up Ruby apps in development. Apache is the old standby for serving up PHP (and other) apps in development. Pow and Apache don't play nice, but we can change that.
07 Apr 2011
Updating a related object in an ActiveRecord callback can be tricky due to association caching. It tripped me up for too long and Google was not helpful. Hopefully this post will at least solve the unhelpful Googling problem.
25 Feb 2011
This post isn't trying to sell you on screen
. There are umpteen sites out there which do that. Instead, I'd like to share with you how I've engineered my setup such that it's a joy to use.
31 Jan 2011
Sprinkle this sugary function on top of your jQuery for a little syntactic delight.
27 Dec 2010
Working with JavaScript inside of a WebKit WebView can be tricky because bare-bone WebViews don't ship with the handy, dandy developer console that is available in Safari and Chrome. In this post, I outline how to get your JavaScript console.logs to show up in Xcode's Debugger Console using NSLog.
15 Dec 2010
In which I pay respect to the many open source libraries we used as foundation for Grooveshark's new web-based player.
09 Dec 2010
The old TMail gem used in Rails allowed directly importing parsed attachments into Paperclip. The new Mail gem works differently, but we can make them play nice.
07 Jan 2010
Writing a web app using Cappuccino has a lot of benefits, one of which is a really nice message passing system wherein certain objects can register to observe events and take action when other objects post notifications of those events.
02 Dec 2009
Most of the online regular expression testers I've used just aren't that useful, but Rubular is the exception.
16 Nov 2009
The much anticipated 280 Atlas developer beta is under way and I recorded a brief screencast introducing the basic concepts of creating applications with Atlas.
24 Aug 2009
Ruby's `abort` method may be just what you need to print a message and exit.
20 Aug 2009
I have a lot of Ruby scripts running on different servers all scheduled via cron and it's quite easy to forget what script is scheduled when and how often. This can be worked around with `Whenever`.
16 Aug 2009
I recently learned that you can fix you're previous commit (modify commit message, add more files, etc.) quite easily with git.
18 Jul 2009
If you want to be able to toggle your development log between the default Rails logger and the console, just add this method to your `~/.irbrc`
09 Jul 2009
A Sass mixin for centering a div on a page horizontally and vertically.
01 Jul 2009
If you want to nest tabs inside one another you'll need to change things slightly. I demonstrate in this post.
02 Jun 2009
A Capistrano task to install Ruby 1.9.1 to `/opt/ruby-1.9.1` on Debian
31 May 2009
A couple of technologies have come along and made my deployment process a whole lot easier.
22 May 2009
With this little Ruby script, you can arbitrarily generate files of any size (using 1MB increments).
18 May 2009
Use jQuery to add the target attribute to links so it doesn't muck up the HTML.
17 May 2009
Let's use Ruby to generate a list of people highly followed by our friends.
12 May 2009
See Which Twitterers Don't Follow You Back In Less Than 15 Lines of Ruby
09 May 2009
How to set the mouse's focus to an element on the page when the DOM is ready, using jQuery
21 Feb 2009
A project I'm working on required a little more from Ruby's TMail library than it offers out of the box.
17 Feb 2009
Feel free to use this simple method to send email
27 Aug 2008
When it comes to dealing with dates and their formats between different databases, Ruby, time zones, etc, etc…it can get pretty nasty...
19 Aug 2008
Even trivial apps need to be configured. Why not use Yaml?
18 Aug 2008
Walking through the basic usage of Ruby's `rescue` feature
09 Aug 2008
I was interested in creating a step-by-step form wizard for a Rails app I’ve been working on, so naturally I began searching for a jQuery plugin or tutorial. The best thing I could find was a ‘plugin’ written back in June of 2007...
24 Jul 2008
Unix’s `screen` utility is like pow-pow-power wheels for remote shells.
24 Jul 2008
Ruby makes it super-simple to pass optional arguments with default values.
15 Jul 2008
A few quick tips on traversing directories with Ruby.
11 Jul 2008
I’ve been playing with Capistrano a lot lately and loving it. Here is an example of how easy it is to write tasks and use them on multiple remote servers.
20 Jun 2008
Sometimes one layout (application.html.erb) just doesn’t cut it, but you don’t want a separate layout for each controller in your app. You can use the following technique to nest your Rails app’s layouts.
19 May 2008
If you’re trying to configure git commands in a directory that isn’t `pwd`, you’ll have to deal with `clone` and `pull` a little differently.