View

Count lines of code

The following counts all the lines in all *.rb files in the app directory. Run several of these commands to get a rough estimate of the LOC.

find app -name *.rb -exec wc {} \; | awk '{a+=$1;print a}' | tail -1

MySQL replication how-to

This may be awkward to set up, but will work once you're done.

Fun facts:

  • In case of a connection loss the slave will try to reconnect to the master server and resume replication for the next 24 hours
  • If you want to use your slave as a "real" MySQL server, you basically need to switch off replication (STOP SLAVE; RESET SLAVE; and reset your my.cnf) and restart the MySQL daemon.

Master server configuration

  • Create replication user
    In the MySQL shell:
    CREATE USER 'replicator'@'%' IDENTI...
    
Linked content

Rethinking PDF Creation in Ruby

We're excited to announce PDFKit, an open source library that makes working with wkhtmltopdf a snap.

Linked content

wkhtmltopdf - Project Hosting on Google Code

Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.

Linked content

michaeldv's awesome_print at master - GitHub

Pretty print your Ruby objects with style – in full color and with proper indentation

Linked content

Ruby Ghostscript by Shairon Toledo

Ruby Ghostscript (RGhost) is a library for document developers wanting a quick and easy way to generate pdf files. It's optimized to work with larger documents.

Linked content

jspdf - Project Hosting on Google Code

jsPDF is an open-source library for generating PDF documents using nothing but Javascript. You can use it in a Firefox extension, in Server Side Javascript and with Data URIs in some browsers.

Linked content

A List Apart: Articles: Unwebbable

An example of the conundrum of transferring print documents to the web, one that has become legendary in some circles, is the film screenplay.

This website uses cookies to improve usability and analyze traffic.
Accept or learn more