Go to Settings Manager / Keyboard / Application Shortcuts Add a shortcut for the Print key that calls xfce4-screenshooter -f
Icon fonts like Font Awesome are infinitely scalable, look great on high-DPI displays and will give your app a...
Having your site run on SSL is worthless when you include content over an unsafe connection (HTTP).
Under certain (unknown) circumstances, Rails will give localized files an invalid content-type in the Response header. For me, after...
If you're using the Capybara webdriver, steps sometimes fail because the browser hasn't finished loading the next page...
Haml 3.1.2 displays single quotes in FormBuilder#text_ field html escaped. You may see something like that:
If your application has forms to edit string fields, you probably want to strip the entered values (remove whitespace from...
In a Rails application, *_spec.rb files get special treatment depending on the file's directory. E.g. when you put a...
The linked slidedeck holds many tips, of which I list the most interesting to me below DATA and END
The __END__ keyword tells Ruby where a file ends – but you don't have to stop there. Any text you...
Ruby's mathn library changes Fixnum division to work with exact Rationals, so 2 / 3 => 0 2 / 3 * 3 => 0...
This didn't work for me. Seems display is already taken in Machinist. # in spec/support/blueprints.rb Partner.blueprint do company_name
You're using exception_notification and want to send exception mails within a model. Here's how. The ExceptionNotifier class...
There is no reason to leave trailing whitespace characters in your project's files, so don't add any.
TL;DR Avoid before(:context) (formerly before(:all)), use before(:example) (formerly before(:each)) instead. If you do use before...
simple_format ignores Rails' XSS protection. Even when called with an unsafe string, HTML characters will not be escaped or...
Given you store files on Amazon S3 and you need to stream those files out to people while you don...
Ever wanted autocompletion for paths from paths.rb in Cucumber? This card lets you write your steps like this:
Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...
Under certain circumstances gettext_i18n_rails will hit a near-infinite loop. This occured in Rails 2.3.5 with Haml 3.0.18...
If (for some reason that you don't want to ask yourself) you need to know all classes that define...
If you get errors from your development WEBrick that contain unicode salad, you are probably requesting the page via SSL...
A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...
Assuming the following sunspot setup of the post class: class Post < ActiveRecord::Base searchable do text :title string :state