Twitter's Bootstrap CSS blueprint as a jQuery UI theme. Even if you don't want to use Bootstrap as...
...at least four times2, including a recent rewrite for the upcoming Rails 3. The syntax is now more concise. But never mind making it shorter! It’s time for a...
...when there’s a gem update I know that it has actually been tested somewhat and it’s not just whatever random point HEAD happens to be at, at that...
decided to go fixtureless with Shoulda + Factory Girl. All good, except one problem. Slow as fuck tests. So here’s fast_context as a solution for it. fast_context compiles...
...all the ‘should’s within a context into a single test...
...the ‘border’ of any block level element gets factored into it’s final box size for layout. That means that if you add a border on a hover to an...
...element that didn’t already have a border of that exact size, you will cause a layout shift...
...a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built...
...time programming languages understood what the kids are typing these days. So let's start with a baby step in that direction: Like, Python...
...Apple does not want is for some other company to establish a de facto standard software platform on top of Cocoa Touch. Not Adobe’s Flash. Not .NET (through MonoTouch...
Inspired by a snippet of code in Oliver Steele’s legendary Functional library, here’s a lightweight tool to help keep track of JavaScript invocations. It works in Chrome, Safari...
Lemonade’s goal as a sprite generator is to be incredible easy to use, so you’ll use ist for every project—just because there’s no overhead. It needs...
...no configuration, no Rake task, no Photoshop, just a little change in your Sass or SCSS files...
...remember that the pain is temporary. It’s a little like a vaccine—the shot hurts now, true, but it’s really not that bad in comparison to the disease...
The problem isn't that Git is to hard, it's that smart developers are impatient and have exactly zero tolerance for unexpected behavior in their tools. While Git is...
...now, perhaps some day you will come across a grizzled developer who is using SVN, and when you ask him why, his answer won't make sense, because it's...
When you simply want to get to know Puppet, follow puppetlabs’ Learning Puppet Docs. They give you a handy introduction inside a virtual machine they provide. You can watch the...
...cheatsheat and their learn-puppet virtual machine. #Installation and basic configuration on Ubuntu Linux: sudo apt-get install puppet, then follow this guide starting at "Creating a Puppet configuration"
Cucumber's docstrings let you add long strings to a step like this: # foo.feature Given this text: """ First line Second line Second Paragraph """ # foo_steps.rb Given /^this text:$/ |docstring| puts docstring.split...
# Does not work: Given this text: """ Docstrings work like this: \"\"\" Docstring example \"\"\" You see? """ Self-made Solution Cucumber Transforms to the rescue! Transforms are run on step arguments after...
There seems to be no way to use therubyracer -v '0.11.4' and libv8 -v '3.11.8.17' on OS X Mavericks. However, running bundle update therubyracer worked for me. It installed therubyracer...
...v '0.12.1' and libv8 -v '3.16.14.3' and I had not side effects. Log of my attempts to get it working Probably you got here when bundling failed building native extensions...
...Ruby. def and define_method differ in which one they use. def Ruby keyword, starts a method definition Opens a new, isolated scope. Variables defined outside are not accessible inside...
...and vice versa. Defines an instance method on the receiver (specified before the method name, e.g. def object.foo); implicit receiver is the default definee The default definee is not self...
For my Gem Session project Holly I ran the Ironman of drag'n...
...drop implementations: Dragging in nested lists User-definable order of items Complicated item elements with super-custom CSS and other Javascript functionality Items that can be both leaves and containers...
has_one :note end class Note < ActiveRecord::Base belongs_to :project end Now say we need a validation that ensures that a description is set (validates_presence_of :description...
...within Note but only if the Project has a flag called external set to true. The following code will lead to some problems as the associated object is not present...
Having your site run on SSL is worthless when you include content over an unsafe connection (HTTP). Here is how to hunt down mixed content with Firefox.
...on pages (mine did not), you can enable it again: Visit about:config and search for security.warn_viewing_mixed. If it's set to false, set it back to true...
When you have a complex recipe setup with multistage deployment you may run into this error: `role_list_from': unknown role `something' (ArgumentError) Consider this task definition: namespace :foo do...
...task :bar, :roles => :something do # do crazy stuff end end Whenever we call foo.bar in our recipe, Capistrano will fail if you deploy to a stage where none of the...
If you're using Paperclip to store and convert images attached to your models, processing a lot of images will probably cause headache for your system operation colleagues because CPU...
If you're on Unix you can use nice to tell the Kernel scheduler to prefer other processes that request CPU cycles. Keep in mind that this will not...
Running Cucumber tests while your cucumber.yml is 100% valid may still produce the following error. cucumber.yml was found, but could not be parsed. Please refer to cucumber's documentation on...
...using form_for you can give the form's target URL either as a string or an array: form_for(admin_user_path(@user)) do...
# same as:
...path and polymorphic_url If you would like to generate a path or URL string from an array of route components just as form_for does, you can use polymorphic...
...restangular collection and you want to remove an element from it, after you've successfully deleted it from the server. The README suggests to say something like $scope.users = _.without($scope.users...
...horribly when you want to use restangular's attributes on that collection. This is simply because of the way _.without works: It returns a new array with all elements except...