Put the font files (e.g. ttf) into ~/.fonts Run fc-cache -v Or, if you prefer to use the GUI...

In a JavaScript console, type this: > 9112347935156469760 9112347935156470000 Ooops. And that's not a float! This occurs because JavaScript uses...

You select some characters, make them bold and suddenly your entire document is bold? Here's how to fix that...

Browsers make this very hard. Even when you explicitely set the selection inside the textarea (e. g. using jquery-fieldselection...

The asset pipeline changes the paths of CSS files during precompilation. This opens a world of pain when CSS files...

gist.github.com

A nice bookmarklet to analyze how many watchers have been registered on the current page. Good for keeping an eye...

We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...

Modern browsers natively suppport file pickers that allow the user to choose multiple files at once. To activate this feature...

Cookies without an expiration timestamp are called "session cookies". [1] They should only be kept until the end of the...

Capybara and most assistive technology will fail to find tags that are missing an href attribute. This will probably happen...

github.com

PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...

blog.mailgun.com

Styling HTML email is painful. Tables, inline CSS, unsupported CSS, desktop clients, web clients, mobile clients, various devices, various providers...

devdocs.io

DevDocs combines multiple API documentations in a fast, organized, and searchable interface. Pretty awesome project. You can select multiple docs...

zerosixthree.se

See attached link. The gist is: .element { position: relative; top: 50%; transform: translateY(-50%); } Works in all web browsers and...

When you don't only have a favicon.ico in your project but also PNGs of different sizes and backgrounds, you...

Safari on iOS accepts an apple-touch-icon favicon that is used for stuff like desktop bookmarks. Always define a...

Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...

makandra dev

Spreewald now has a spreewald binary that lists all available steps, optionally filtering them. Example: $> spreewald # All Spreewald steps

Be careful to name any file @imported by SASS with a leading underscore. SASS files not beginning with an underscore...

The adjust-hue function of Sass allows you to change a color's hue, but only relative to its current...

plugins.jquery.com

SudoSlider is a simple yet powerful content slider that makes no (or very few) assumptions about your markup and is...

When you cannot make Selenium trigger events you rely on (e.g. a "change" event when filling in a form field...

blog.salsify.com

An all-in-approach to fix the problem of pending AJAX requests dying in the browser when the server ends...

You need this awkward command: page.driver.browser.action.move_to(page.find(selector).native).perform Note that there are better ways for newer Capybaras...