When ending a Selenium test Capybara resets the browser state by closing the tab, clearing cookies, localStorage, etc.
Awesome hack by Tim VanFosson:
Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple...
Clever hack using data-attributes to assign labels to cells. It's still a massive duplication of code (labels), but...
If you want to rotate text, you can use CSS transforms in somewhat modern browsers to rotate the container element...
Often times you want to give a bunch of elements the same style, except for the last. For example borders...
Please don't simply copy line number links from Github. The URL usually contains a branch name like master which...
See this Railscast. Basically you can simply write views like index.xlsx.erb: ID Name Release Date Price <% @products.each do |product| %> <%= product.id...
Write a // and indent every subsequent line by two spaces. This is great for documenting BEM blocks! // An action button...
Webfonts are not always available when your JavaScript runs on first page load. Since fonts may affect element sizes, you...
The debate between using mixins or extends in Sass has been heating up recently. From the surface it appears they...
jQuery doesn't store information about event listeners and data values with the element itself. This information is instead stored...
The CSS property z-index is not as global as you might think. Actually, it is scoped to a so...
Use it like this for inline icons: Germany They also work as block elements:
Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...
This jasmine plugin helps with testing DOM manipulation in two ways: It gives you DOM-related matchers like toBeVisible() or...
Angular 1.3+ has an alternative getter/setter pattern: You can bind ng-model to an accessor function. This is a function...
This is a problem when using Selenium with Firefox. We recommend using ChromeDriver for your Selenium tests. This setup allows...
Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...
jQuery comes with .animate() that lets you transition some CSS selectors: function floatIn($element) { $element.css({ 'opacity': 0, 'margin-top': 200px...
Bourbon is a library of pure Sass mixins that are designed to be simple and easy to use. No configuration...
A set of javascript tools for working with files. It offers different kinds of things: A cross-browser JS API...
Lightweight Angular JS directive to upload files Includes polyfills for old IEs. Unfortunately, their auto-loading mechanism may not work...
When using git diff, you might encounter weird characters where umlauts (or any other UTF-8) characters should be. It...