Inspecting a live Ruby process

Posted About 12 years ago by Tobias Kraze.
weblog.jamisbuck.org

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

Posted About 12 years ago by Henning Koch.
robots.thoughtbot.com

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

Posted About 12 years ago by Dominik Schöler.
github.com

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

Posted Over 12 years ago by Arne Hartherz.

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

Posted Over 12 years ago by Henning Koch.

When you print out a HTML pages, all raster images (like PNGs) will appear aliased. This is because a printer...

monperrus/ExpandAnimations - GitHub

Posted Over 12 years ago by Henning Koch.
github.com

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

Posted Over 12 years ago by Christoph Beck.
blog.bitcrowd.net

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

Posted Over 12 years ago by Arne Hartherz.
commandlinefu.com

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

Posted Over 12 years ago by Christoph Beck.
blog.bitcrowd.net

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

Posted Over 12 years ago by Henning Koch.

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

Posted Over 12 years ago by Henning Koch.

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

Posted Over 12 years ago by Henning Koch.

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

Posted Over 12 years ago by Henning Koch.

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

Posted Over 12 years ago by Henning Koch.

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

Posted Over 12 years ago by Tobias Kraze.
pdfposter.origo.ethz.ch

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

Posted Almost 13 years ago by Henning Koch.

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

Posted Almost 13 years ago by Arne Hartherz.

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

Posted Almost 13 years ago.

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

Posted Almost 13 years ago by Lexy.
vectormagic.com

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

Posted Almost 13 years ago by Lexy.
cssnewbie.com

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

Posted About 13 years ago.

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

Posted About 13 years ago by Lexy.
phantomjs.org

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

Posted About 13 years ago by Thomas Eisenbarth.
ctan.larsko.net

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

Posted About 13 years ago by Arne Hartherz.

If you run specs or your application and get an error like: ActionController::MissingFile in 'ProductsController#show, should render PDF...