CSS3 comes with new unit rem. It works like em but it is always relative to the element instead of...
When two classes implement the same behavior (methods, callbacks, etc.), you should extract that behavior into a trait or module...
In Rails 5 you can say: ApplicationController.render( :template => 'users/index', :layout => 'my_layout', :assigns => { users: @users } ) If a Request Environment is...
Exception notifications contain a lot of information: Backtraces, HTTP headers, etc. exception_notification tries its best to format this wall...
For websites that don't do JavaScript rendering on the client, it's best practice to put script tags at...
I recently encountered the error above when I was running selenium tests. Thanks to a post on stackoverflow I found...
Using CSS sprites for background images is a technique for optimizing page load time by combining smaller images into a...
Next time you have to do more than trivial CSS changes on a project, you probably want to have live...
1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...
Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...
New WYSIWYG editor that claims to be lighter and prettier than TinyMCE and CKEditor. Has some Rails integration, too.
This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop...
When HTTP clients make an request they can define which response formats they can process. They do it by adding...
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...
If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...
This works well in the simplified case, when your link disappears after it was clicked. Let link_to_remote behave...
So you want to find out how many horizontal pixels you have available on a mobile device. This is super...
Examples how to create dozens of shapes using pure CSS and a single HTML element.
Basic error pages To add a few basic styles to the default error pages in Rails, just edit the default...
If - for whatever reason - you have to render stylesheets dynamically, the following snippet might be of help. It emulates what...
You know that you can force absolute URLs throughout a response. Now you want to modify URLs similarly, but only...
As the title says: this jQuery plugin creates bar charts from HTML tables. It comes in some different flavors.
The classical scenario: There's a parent div element and you want to center some arbitrary child element vertically inside...