Inspecting a live Ruby process
How to get a backtrace from a running Ruby process: Ruby 2.6 # First, find out the PID of your Ruby...
Ruby blocks: Braces and do/end have different precedence
TL;DR {} binds stronger than do … end (as always in Ruby, special characters bind stronger than words) Demo
Make your Rails console (and irb) output better readable
Pour color on your Rails console with awesome_print. Turn confusing long strings into formatted output. Have objects and classes...
How to print Github wiki pages
I have no idea how it's supposed to work (or why the don't have a print CSS), but...
How to embed images in higher resolutions for printing
When you print out a HTML pages, all raster images (like PNGs) will appear aliased. This is because a printer...
monperrus/ExpandAnimations - GitHub
ExpandAnimations is a LibreOffice/OpenOffice.org Impress extension to expand presentation animations before exporting to PDF. This way the exported PDF will...
Single step and slow motion for cucumber scenarios using @javascript selenium
Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...
Removing ANSI color codes from Rails logs
The colors in Rails log files are helpful when watching them but, since they are ANSI color codes like ^[[4...
Prevent the selenium webbrowser window from closing after a failed @javascript step
When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...
Use a Ruby method like a block or lambda
Sometimes you want to use a vanilla Ruby method like a block. You can use Object#method to obtain a...
Fix: "undefined method `bytesize' for #<Array>"
I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print...
Invoices: How to properly round and calculate totals
While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...
Convert the colorspace of a PDF from RGB to CMYK under Ubuntu Linux
Note that converting from RGB to CMYK will usually degrade your colors because no exact mapping is possible. Anyway, this...
Rotate a PDF under Ubuntu Linux
Use the PDF toolkit: sudo apt-get install pdftk To rotate page 1 by 90 degrees clockwise: pdftk in.pdf cat...
Print large PDFs as a poster
Pdfposter is a Python script that allows to convert large PDFs into a PDF with multiple pages that can be...
Unpack a .tar.gz archive
You can unpack a .tar.gz file into the current directory like this: tar -xzvf archive.tar.gz The options used are
Printing to PDF files on Ubuntu
This will install a printer called "PDF": sudo apt-get install cups-pdf Files will be put into ~/PDF/ without...
Fix randomly failing PDF cucumber tests
Sometimes PDF cucumber tests fail at the first test run and succeed at the second run. You can fix this...
Vector Magic: Precision Bitmap To Vector Conversion Online
Automatically convert bitmap images like JPEGs, GIFs and PNGs to the crisp, clean, scalable vector art of EPS, SVG, and...
Print-Friendly Images and Logos with CSS
The trick is this: send a low-resolution version of your image to the screen, and a high-resolution version...
Install LaTeX on Ubuntu 10.10
The Ubuntu Documentation on LaTeX says, that the packages tetex are no longer supported. You can install the alternative texlive...
PhantomJS: Headless WebKit with JavaScript API
PhantomJS is a minimalistic headless WebKit. It has fast and native support for various web standards: DOM handling, CSS selector...
Include existing PDF files into new TeX document
If you plan to insert an existing PDF into a new LaTeX document that you will compile to PDF, you...
Fix errors when rendering PDF output
If you run specs or your application and get an error like: ActionController::MissingFile in 'ProductsController#show, should render PDF...