features are pre-sold without any option to negotiate what’s important and what may be left out, you inevitably end up with too much complexity. Such pre-sold features...
I think this pattern is really useful not just for upgrading suites from Webrat, but really anywhere you have an HTML fragment or string that you’d like to use...
We are changing our name from Hoptoad to Airbrake. You see, some folks much larger than us reached out and claimed trademark over all things related to frogs and toads...
...and little animals of that ilk. After speaking to our lawyers we reluctanctly decided it’s best to change the name...
Automatically convert bitmap images like JPEGs, GIFs and PNGs to the crisp, clean, scalable vector art of EPS, SVG, and PDF with the world's best auto-tracing software...
Make sure you understand differences between git's areas (such as stash, workspace, upstream, etc.) and what commands affect which areas...
...looks inside popular package managers, finds changes you made to configuration files, and archives software you built from source to generate Puppet, Chef, or shell code. Everything blueprint sees is...
...stored in Git to be diffed and pushed. It runs on Ubuntu Linux 10.04 and newer...
...m working on a problem for a client which involves connecting to a Microsoft SQL Server 2005 database from Linux using Ruby. Here’s what I did to get it...
E. g. in the following example, Array could mean either Foo::Array or simply Array: class Foo def list Array.new end end What Ruby does here is to see...
...if the name Array makes sense inside of Foo::, and if that fails, resolves it to ::Array (without a namespace). The bad This is relevant for old Ruby versions. Ruby...
...multiply a BigDecimal with another BigDecimal, the result will be a new BigDecimal with sufficient precision to represent the result. No rounding or clipping should occur in that operation.
...means you just transitioned back into the land of random rounding errors. Don't screw up your clean BigDecimal values by thoughtlessly multiplying them with a Float. For instance, this...
Non-static elements will not inherit their parent's opacity in IE for no good reason. This can lead to unexpected behaviour when you want to fade/hide an element and...
To fix it, give the parent element defining the opacity a non-static positioning. For example: .parent { opacity: 0.2; position: relative; /* for IE */ } While the linked article describes...
You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you move on with this note. Say this is your Spaceship...
...class with a transition launch and a release_docking_clamps callback: class Spaceship state_machine :state, :initial => :docked do event :launch do transition :docked => :en_route end before_transition :on...
Pour color on your Rails console with awesome_print. Turn confusing long strings into formatted output. Have objects and classes laid out clearly whenever you need it. Put gem 'awesome...
...ap that will give you a colored, formatted output of whatever you pass it. See the example output of the User class below. For customization visit the repository on Github...
...s Deferreds. Native promises are much faster than their jQuery equivalent. Native promises are supported on all browsers except IE <=11, Android <= 4.4 and iOS <= 7. If you need Promise...
...support for these old browsers you can use a Polyfill. A very fast and small (2 KB minified and gzipped) polyfill is Zousan. If you want to waste even fewer...
If you're using the Capybara webdriver, steps sometimes fail because the browser hasn't finished loading the next page yet, or it still has a pending AJAX request. You...
...ll often see workarounds like When I wait for the page to load Then ... Workarounds like this do not work reliably, will result in flickering tests and should be avoided...
Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some CONSTANT you have defined in an other class. Since actually...
...constants are called constants because they're constant, there's no way to easily stub a constant. Here are three solutions for you. Easiest solution Rethink! Do you really need...
Note: If you using a passenger lower than 5.0.10 you have to use sudo to run this command. If using it with capistrano you should use passenger >=4.0.41 and...
...s possible you get this "error" message: *** [err :: example.com] There are no Phusion Passenger-served applications running whose paths begin with '/var/www/example.com'. *** [err :: example.com] This is just because there were...
When adding a new field to your model's database table, don't set any defaults in the database. It makes people wonder why they get such values when reading...
Why? Because nobody looks at the database layout since such things are part of your application's logic -- and thus they belong into the corresponding model. How to
Say you want to vertically align a div box inside a div container. This is how you do it: HTML Some text... in two lines. CSS Set the line-height...
...The container MUST have a height >= its line-height, because the line-height actually spans the area inside which .box will align vertically. #container { line-height: 50px; } Because the container...
...a linear gradient to an element, IE9 removes all border-radius and inset box-shadows. This is because you probably are doing linear gradients with this weirdo Microsoft filter:
...progid:DXImageTransform.Microsoft.gradient(startColorstr='#0A284B', endColorstr='#135887'); filter hijacks the rendering of the entire element box, so you're out of luck. IE9 doesn't support CSS gradients. A forward-looking...
...queries, Internet Explorer 8 and below will fail to respect them. Though there are several options (like mediatizr and css3-mediaqueries), Respond.js was the only one that worked for me...
= javascript_include_tag 'media_queries_polyfill' Note: Using an IE conditional means other super-ancient browsers that do not support media queries (like Safari 2.x, or Firefox...
For applications coming with lots of stylesheets and scripts, asset compilation might take quite long. This can be annoying when deploying a release that does not actually change assets.
...your app uses Sprockets, you can simply skip asset compilation and re-use the previous release's assets. [1] That is especially easy via Capistrano. Capistrano will automatically symlink your...
...lambdas in Ruby work, check out the code at the attached link. Here the summary: ^ ---------------------------- Section 6: Summary ---------------------------- So, what's the final verdict on those 7 closure-like entities...
...method Y closure yes The things within each of these groups are all semantically identical -- that is, they're different syntaxes for the same thing: 1. block (called with yield...
...doesn't embed most fonts into the PDFs it generates. This means if you share a slide show with a font that is not Arial or Times, other people will...
...everything and creates a big ass PDF full of images. A workaround The only solution is to directly print the PDF to a PDF printer, or take the PDF generated...
The classical scenario: There's a parent div element and you want to center some arbitrary child element vertically inside of it. Here's how you do it (also try...
} .child {} When .child elements are inline elements, add display: block; to their style. When you need to specify the width of .child elements, center them with margin: auto...