Sometimes you may want to print files from the command line, especially when you have lots of them.
A look at Prawn, PDFKit, and Wicked PDF
To print a colored full-width bar on the bash, use this bash script expression: echo -e '\033[37;44m...
I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...
In Ruby, classes and modules are called constants. This card explains how Ruby resolves the meaning of a constant.
When you print something from within your .bashrc file you will run into trouble when copying something onto your machine...
Assert rmagick provision ... Gemfile gem 'rmagick', '2.13.2' # at this moment the latest stable version config/initializer/carrierwave.rb require 'carrierwave/processing/rmagick' ... and define a...
When I upgraded from 0.5.4 PDFKit deadlocked or crashed when an ApplicationController::RouteError occured. If this error happens only because...
Ubuntu 12.04 LTS x64, Ruby 1.8.7, Rails 2.13, PDFKit 0.5.4, Phusion Passenger Apache 2 I ran into this, when I...
So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...
So you're switching to PostgreSQL from MySQL? Here is some help... General hints on PostgreSQL \? opens the command overview...
When you're writing migrations that do more than changing tables (like, modify many records) you may want some output...
In Rails 5 you can say: ApplicationController.render( :template => 'users/index', :layout => 'my_layout', :assigns => { users: @users } ) If a Request Environment is...
You can use xmllint to pretty-print ugly XML files on your terminal. Just say: xmllint --format file.xml
Smashing Magazine lists some handy tricks for print style sheets, all with CSS: Expand External Links For Print
Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...
Prepare to explain customers what changed if your application renders PDF documents to users.
Go to Settings Manager / Keyboard / Application Shortcuts Add a shortcut for the Print key that calls xfce4-screenshooter -f
There is no reason to leave trailing whitespace characters in your project's files, so don't add any.
Given you store files on Amazon S3 and you need to stream those files out to people while you don...
A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...
LibreOffice Impress, Writer, etc. doesn't embed most fonts into the PDFs it generates. This means if you share a...
Localizing a non-trivial application can be a huge undertaking. This card will give you an overview over the many...
Embedding bitmap images within PDF sometimes results in large files because the bitmaps are not compressed. If you don't...