If you have issues with PDFs, fix them like this: pdftk .pdf output .pdf Background I had an issue where...
Just install the texlive-xetex package: sudo apt-get install texlive-xetex Running integration tests without texlive-xetex will produce...
Browsers make this very hard. Even when you explicitely set the selection inside the textarea (e. g. using jquery-fieldselection...
We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...
In Thunderbird, you can set custom font faces and sizes for reading plain-text e-mails. However, Thunderbird sometimes "randomly...
If you're using the :header_html option in PDFKit (or the corresponding --header-html option in wkhtmltopdf), and the...
Capybara and most assistive technology will fail to find tags that are missing an href attribute. This will probably happen...
When your system is not running on English, you may sometimes want to run some applications and not use your...
In Rails, you can very easily send emails with HTML and plaintext bodies. However, if you're trying to debug...
Let's say you have two screens: Show a given project Show a report for all projects Ideally you want...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
Nearly all jQuery traversal functions ignore elements that are not HTML tags. To work with other type of nodes (like...
The The U.S. Digital Services Playbook is pretty amazing (context).
When you have an Angular directive that transcludes content, you might want to do something in case there is no...
TL;DR In blueprints, always wrap associations in blocks. # Broken Task.blueprint(:vacation) do project Project.make(:vacation) hours 8 accounting_method...
In Cucumber, scenario outlines help avoiding tests that are basically the same, except for a few variables (such as different...
When you don't only have a favicon.ico in your project but also PNGs of different sizes and backgrounds, you...
Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...
This actually works: class Klass def initialize `hi world` end def `(message) puts "Called with backticks: #{message}" end end
SudoSlider is a simple yet powerful content slider that makes no (or very few) assumptions about your markup and is...
When you have a string containing umlauts which don't behave as expected (are not matched with a regexp, can...
MuPDF is a PDF reader that renders very quickly, yet still correctly. It supports PDF 1.7 and all the fancy...
So you want your Ruby script to install missing gems instead of dying? Take this method: def installing_missing_gems...
When your Rails controller action responds with only a simple text, render text: 'Hello' may not be what you want...