If you have issues with PDFs, fix them like this: pdftk .pdf output .pdf Background I had an issue where...
You select some characters, make them bold and suddenly your entire document is bold? Here's how to fix that...
The asset pipeline changes the paths of CSS files during precompilation. This opens a world of pain when CSS files...
Angular-xeditable is a bundle of AngularJS directives that allows you to create editable elements. Such technique is also known...
In addition to the {{ myValue }} two-way binding syntax, since Angular 1.3 there's a one-time binding syntax, prefixing...
Returning an empty scope can come in handy, e.g. as a default object. In Rails 4 you can achieve this...
This is what worked for me in a Rails 4: # JSON data as first argument, then parameters patch :update, { some...
Modern browsers natively suppport file pickers that allow the user to choose multiple files at once. To activate this feature...
class Document < ActiveRecord::Base scope :any_tags, -> (tags){ where('tags && ARRAY[?]', tags) } scope :all_tags, -> (tags){ where('tags @> ARRAY...
tl;dr: Use with_index ActiveRecord's find_each with index If you do not provide a block to find...
A different take on what we're doing with ActiveType. Since it lives under the rails organization it might be...
In Thunderbird, you can set custom font faces and sizes for reading plain-text e-mails. However, Thunderbird sometimes "randomly...
You need to copy an entire website? Use wget like this: wget -kr http://host.tld/ This will fetch all content...
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...
In Rails, you can very easily send emails with HTML and plaintext bodies. However, if you're trying to debug...
# config/initializers/sidekiq.rb # Perform Sidekiq jobs immediately in development, # so you don't have to run a separate process.
For server-to-server requests to the Facebook Graph API you can skip requesting an Oauth token, an...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
If you want to move an element inside an array, neither JavaScript/ES6+ nor libraries like LoDash offet that natively.
Styling HTML email is painful. Tables, inline CSS, unsupported CSS, desktop clients, web clients, mobile clients, various devices, various providers...
Yesterday, Rails fixed a security issue (CVE-2014-3514) in Rails 4+. It was possible to use .where...
Nearly all jQuery traversal functions ignore elements that are not HTML tags. To work with other type of nodes (like...
These two addons will change your life: Search as list This will always open search results in the list views...