PDF Generation in Rails

Posted About 10 years ago by Arne Hartherz.
sitepoint.com

A look at Prawn, PDFKit, and Wicked PDF

Bash: Heavy headings for CLI

Posted About 10 years ago by Dominik Schöler.

To print a colored full-width bar on the bash, use this bash script expression: echo -e '\033[37;44m...

How to load only a subset of a massive MySQL dump

Posted Over 10 years ago by Arne Hartherz.

I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...

Ruby constant lookup: The good, the bad and the ugly

Posted Over 10 years ago by Henning Koch.

In Ruby, classes and modules are called constants. This card explains how Ruby resolves the meaning of a constant.

Bash: How to only do things in interactive shells

Posted Over 10 years ago by Thomas Eisenbarth.

When you print something from within your .bashrc file you will run into trouble when copying something onto your machine...

Howto provide a single page preview for PDF & TXT with carrierwave

Posted Over 10 years ago.

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...

Don't use PDFKit v0.5.4 – it breaks on dead urls

Posted Over 10 years ago.

When I upgraded from 0.5.4 PDFKit deadlocked or crashed when an ApplicationController::RouteError occured. If this error happens only because...

Fix „command failed: /usr/bin/wkhtmltopdf ...“ using PDFKit middleware

Posted Over 10 years ago.

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...

Implementing social media "like" buttons: Everything you never wanted to know

Posted Over 10 years ago by Henning Koch.

So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...

PostgreSQL cheat sheet for MySQL lamers

Posted Over 10 years ago by Thomas Eisenbarth.

So you're switching to PostgreSQL from MySQL? Here is some help... General hints on PostgreSQL \? opens the command overview...

Rails: Output helpers for migrations

Posted Over 10 years ago by Dominik Schöler.
apidock.com

When you're writing migrations that do more than changing tables (like, modify many records) you may want some output...

Render a view from a model in Rails

Posted Over 10 years ago by Henning Koch.

In Rails 5 you can say: ApplicationController.render( :template => 'users/index', :layout => 'my_layout', :assigns => { users: @users } ) If a Request Environment is...

How to inspect XML files in a terminal

Posted Almost 11 years ago by Arne Hartherz.

You can use xmllint to pretty-print ugly XML files on your terminal. Just say: xmllint --format file.xml

Tips And Tricks For Print Style Sheets

Posted About 11 years ago by Dominik Schöler.
coding.smashingmagazine.com

Smashing Magazine lists some handy tricks for print style sheets, all with CSS: Expand External Links For Print

Loading dumps via SSH, unpacking and sourcing them, all with a progress bar

Posted About 11 years ago by Arne Hartherz.

Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...

Firefox introduces PDF viewer

Posted About 11 years ago by Thomas Eisenbarth.
blog.mozilla.org

Prepare to explain customers what changed if your application renders PDF documents to users.

Xfce: Take a screenshot with the "Print" key

Posted Over 11 years ago by Henning Koch.

Go to Settings Manager / Keyboard / Application Shortcuts Add a shortcut for the Print key that calls xfce4-screenshooter -f

How to not leave trailing whitespace (using your editor or Git)

Posted Over 11 years ago by Arne Hartherz.

There is no reason to leave trailing whitespace characters in your project's files, so don't add any.

Distribute files from a private bucket on AWS S3

Posted Over 11 years ago by Thomas Eisenbarth.

Given you store files on Amazon S3 and you need to stream those files out to people while you don...

How to test print stylesheets with Cucumber and Capybara

Posted Over 11 years ago by Henning Koch.

A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...

LibreOffice won't embed most fonts into PDFs (with fix)

Posted Almost 12 years ago by Henning Koch.

LibreOffice Impress, Writer, etc. doesn't embed most fonts into the PDFs it generates. This means if you share a...

Guide to localizing a Rails application

Posted Almost 12 years ago by Henning Koch.

Localizing a non-trivial application can be a huge undertaking. This card will give you an overview over the many...

Compress bitmap images within PDF files

Posted Almost 12 years ago by Thomas Eisenbarth.

Embedding bitmap images within PDF sometimes results in large files because the bitmaps are not compressed. If you don't...

Google Analytics: Change the tracked URL path

Posted Almost 12 years ago by Henning Koch.

By default, Google Analytics tracks the current URL for every request. Sometimes you will want to track another URL instead...