Skip to content

Instantly share code, notes, and snippets.

View revnode's full-sized avatar
🏙️

Marat A. Denenberg revnode

🏙️
View GitHub Profile
@revnode
revnode / remote tar to local
Created June 5, 2013 19:04
Create a local compressed tarball from remote host directory
ssh user@host "tar -zcf - /path/to/dir" > dir.tar.gz
@revnode
revnode / PhantomJS to PDF
Created June 13, 2013 19:52
PhatomJS to PDF conversion script.
page = require('webpage').create()
system = require 'system'
if system.args.length < 3 or system.args.length > 4
console.log 'Usage: rasterize.coffee URL filename [paperwidth*paperheight|paperformat]'
console.log ' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"'
phantom.exit 1
else
address = system.args[1]
output = system.args[2]