Simply use OpenStruct#to_h to receive an OpenStruct's hash representation. In older Rubies you need OpenStruct#marshal_dump...
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:
This plugin makes it easy to add fit-to-fill background video to websites. It can play silent ambient background...
StaticMatic is a nice tool to build simple static websites. In case you want to have some nifty styles on...
Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...
Keychain helps you to manage ssh and GPG keys in a convenient and secure manner. It acts as a frontend...
Under certain circumstances gettext_i18n_rails will hit a near-infinite loop. This occured in Rails 2.3.5 with Haml 3.0.18...
Interesting interview with DHH, where he talks about how they made the new Basecamp feel very fast without using a...
If a customer calls and tells you that she cannot see some content of her website beware of the following...
If you have an html_safe string, you won't be able to call gsub with a block and match...
If (for some reason that you don't want to ask yourself) you need to know all classes that define...
In a nutshell: return statements inside blocks cause a method's return value to change. This is by design (and...
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...
With the the Ruby Tempfile class you can create temporary files. Those files only stick around as long as you...
This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...
There are many fun Unicode characters like ▲ or ☯. You might be tempted to use them for graphical elements in lieu...
Nice list of icon sets that come in the form of fonts. I recommend Font Awesome.
RubyMine: Set specific Ruby version per project
Assuming the following sunspot setup of the post class: class Post < ActiveRecord::Base searchable do text :title string :state
Note: Instead of using the method in this card, you probably want to use ActiveType's nested attributes which is...
Every now and then, Java is subject to security issues where code can break out of Java's sandbox and...