Skip to content

Instantly share code, notes, and snippets.

@eclosson
eclosson / gist:6716721
Created September 26, 2013 16:34
Textmate File Pattern I Like
!(/\.(?!htaccess|git*|rvm*|rspec*|ruby*)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
@eclosson
eclosson / pdf_merger.rb
Created January 11, 2013 18:29
Merging PDFs with Prawn
class PdfMerger
def merge(pdf_paths, destination)
first_pdf_path = pdf_paths.delete_at(0)
Prawn::Document.generate(destination, :template => first_pdf_path) do |pdf|
pdf_paths.each do |pdf_path|
pdf.go_to_page(pdf.page_count)